PowerTip: Use PowerShell to Report Daylight Savings Time

PowerTip: Use PowerShell to Report Daylight Savings Time

  • Comments 1
  • Likes

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()

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment