For Developers
How to get the current timestamp, convert it to a date, and convert a date back to a timestamp in Go — plus the specific mistake that trips up Go code more than any other.
time.Now().Unix()
time.Unix(1750000000, 0)
time.Date(2025,6,15,12,0,0,0,time.UTC).Unix()
Go's time.Time is timezone-aware by design — every Time value carries a *Location — so the naive/aware bug class that hits Python and C# mostly can't happen here. The more common Go-specific mistake is forgetting that time.Unix()'s second argument is nanoseconds, not milliseconds, and passing a millisecond value straight into it without conversion.
Paste it into the Timestamp ⇄ Date Converter to check it instantly, in any timezone, without writing any code. Working across several languages on the same project? The full Epoch Time in Programming Languages guide has all of them side by side for quick comparison.
Related
Every language's snippets side by side, for quick comparison.
Convert any timestamp instantly, no code required.
See one date rendered in ISO, US, EU, and more, at once.