PowerTip: Use PowerShell to Report Daylight Savings Time

Doctor Scripto

Summary: Use Windows PowerShell to report if it is daylight savings time.

Hey, Scripting Guy! Question How can I use Windows PowerShell to report if it is daylight savings time?

Hey, Scripting Guy! Answer Use the Get-Date cmdlet, and call the IsDaylightSavingTime method from the DateTime object:

(Get-Date).IsDaylightSavingTime()

0 comments

Discussion is closed.

Feedback usabilla icon