For those trying to format the current date for use in the HTTP header, use the "r" format (short for RFC1123), but beware of the caution ...
PS C:\Users\Me> (get-date).toString("r") Thu, 16 May 2019 09:20:13 GMT PS C:\Users\Me> get-date -format r Thu, 16 May 2019 09:21:01 GMT PS C:\Users\Me> (get-date).ToUniversalTime().toString("r") Thu, 16 May 2019 16:21:37 GMT
Those. don't forget to use "ToUniversalTime ()"
Peter L May 16 '19 at 18:30 2019-05-16 18:30
source share