this post was submitted on 24 Aug 2025
456 points (98.9% liked)
Programmer Humor
25958 readers
903 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This is exactly why I love PowerShell.
Need the [DateTime] object from 10 years ago? No biggie, just chuck
(Get-Date).AddYears(-10)
down your console.Need it in a specific timezone? That one's trickier, but since PowerShell can do .Net, run this:
And you get a DateTimeOffset object, which is this beauty:
DateTime
is the time in your target timezone,UtcDateTime
is, well, the UTC time, andLocalDateTime
is the time on host you ran the commands on.