The DateTime
structure contains useful methods, like .AddHours()
and .ToString()
. Just add -3 hours to current date. Use the standard date and time format strings to get desired output or roll a cusom one.
PS C:\> $now = get-date
PS C:\> $then = $now.AddHours(-3)
PS C:\> $now.ToString("u")
2013-06-03 18:43:29Z
PS C:\> $then.ToString("u")
2013-06-03 15:43:29Z