Guide
Every language has its own way of asking "what time is it right now" and turning a timestamp back into a date. Here's the reference for each — including which unit (seconds vs. milliseconds) each one defaults to, which trips people up more than anything else.
The single most common bug people hit isn't the syntax — it's the unit. Unix time is defined in seconds, but several languages and platforms (JavaScript, Java, and most JSON-based web APIs) work in milliseconds by default. Mixing the two silently produces a date either 1970 or many thousands of years in the future. Each snippet below notes its default unit explicitly.
Reference
Current epoch time, plus converting a timestamp to a date, in each language.
Most of it comes down to when and where each language grew up. C, Python, PHP, Go, Bash, and most databases inherited the original Unix convention of counting in seconds. JavaScript's Date object was designed in the mid-1990s specifically to match the precision of a browser's clock, so it counts in milliseconds instead — and that choice then spread into JSON APIs and any language interoperating with the browser. Java's System.currentTimeMillis() followed the same millisecond convention for similar reasons, even though its newer java.time package (used in the snippets above) works in seconds.
If you're integrating two systems and dates come out wrong by a factor of exactly 1000 (or land on 1970 or a date thousands of years out), a seconds/milliseconds mismatch is almost always the cause — paste the raw number into the converter above and it will auto-detect which one you're looking at.