Display current time with time zone in PowerShell

前端 未结 7 942
盖世英雄少女心
盖世英雄少女心 2021-02-14 02:06

I\'m trying to display the local time on my system with the TimeZone. How can I display time in this format the simplest way possible on any system?:

Time: 8:00:34 AM ES

7条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-14 02:50

    Be loath to define another datetime format! Use an existing one, such as RFC 1123. There's even a PowerShell shortcut!

    Get-Date -format r
    

    Thu, 14 Jun 2012 16:44:18 GMT

    Ref.: Get-Date

提交回复
热议问题