I can manually check whether it is daylight saving or not. But is there a way to check this using command line or a program (e.g., python)?
Asked
Active
Viewed 818 times
-4
-
With a 600+ rep, you should know that this question is too broad to be on topic; https://stackoverflow.com/help/on-topic – SteveJ Mar 16 '18 at 14:39
1 Answers
0
For Python, From: Python daylight savings time
import time
print(time.localtime().tm_isdst)
Returns 0 or 1 Depending on Daylight Saving
For CMD You could try:
tzutil /g
or
Powershell -Command "(Get-Date).IsDaylightSavingTime()"

Tom
- 685
- 8
- 17