Let's first start with converting local time into UTC:
- At the prompt, type in Get-Date and list out the members of the output object:
PS> Get-Date | Get-Member
- Call the ToUniversalTime method:
Reduce keystrokes by using tab-completion.
PS> (Get-Date).ToUniversalTime()
Compare the output to your local time.
- Let's see what day it would be, exactly 35 days from today:
PS> (Get-Date).AddDays(35)
- If you would like to see what time it would be after 3 hours and 18 minutes, type the following:
PS> (Get-Date).AddHours(3).AddMinutes(18)
- Find out how many days have passed since the World Environment Day, 2016. Enter the command as shown in the following screenshot: