Time is harder than it looks
Unix timestamps, ISO 8601 strings, time zones, daylight saving transitions, and cron expressions are a constant source of bugs. Log entries use epoch seconds, APIs return ISO strings with Z offsets, cron schedulers use five-field expressions, and "what time is it in Tokyo?" requires IANA zone data — not simple UTC offsets.
Tools for common time tasks
- Timestamp converter — translate Unix epoch (seconds or milliseconds) to human-readable dates
- ISO 8601 parser — decode standard date strings from API responses
- Time zone converter — convert between IANA zones like America/New_York and Europe/London
- Date difference — calculate duration between two dates
- Cron parser — explain cron expressions and show next run times
Debugging log timestamps
When log lines show 1704067200 or 1704067200000, check whether your system uses seconds or milliseconds — a common off-by-1000 mistake. Paste the value into the timestamp converter to see both interpretations and confirm which matches your log source.
Cron gotchas
Cron dialects differ: standard cron uses 5 fields (minute hour day month weekday), while some systems add seconds or use different day-of-week numbering. Always verify which cron flavor your scheduler (Kubernetes, AWS EventBridge, systemd) expects before copying expressions from documentation.
Frequently asked questions
Is a Unix timestamp in seconds or milliseconds?
Unix timestamps are traditionally in seconds since 1970-01-01 UTC. JavaScript Date.now() returns milliseconds. Logs and APIs vary — if the number has 13 digits it is likely milliseconds; 10 digits is likely seconds.
Why does my cron job run at the wrong time?
Check the server time zone, whether the scheduler uses UTC or local time, and whether your expression uses the correct number of fields. Use the cron parser to preview the next five run times.
How do I handle daylight saving time?
Use IANA time zone names (e.g. America/New_York) rather than fixed UTC offsets. Fixed offsets do not account for DST transitions and will be wrong twice a year.