How to determine if local time is set to daylight saving time?

Can I find out if the local time is set to daylight saving time?

Is it possible to find out if the local time is set correctly by car?

I guess pretty weird stupid questions (in the absence of an internet connection), but you never know !!

+4
source share
2 answers

You can use TimeZoneInfo.Local.IsDaylightSavingsTime (DateTime.Now) to check if the current time is adjusted.

+6
source

I find that most DST implementations add / remove an hour from the GMT offset when calculating the time, for example, Sydney Australia will be +10 GMT without DST and +11 GMT with DST

0
source

Source: https://habr.com/ru/post/1442211/


All Articles