FHFreeToolHub
Practical Tool Guides

Epoch and timestamp conversion basics

Avoid common mistakes with Unix seconds, milliseconds, ISO dates, local time, and UTC.

Know seconds vs milliseconds

Many timestamp mistakes happen because one system expects seconds and another expects milliseconds.

  • 10-digit values are usually Unix seconds.
  • 13-digit values are usually milliseconds.
  • Check the expected unit before pasting into another system.

Compare local time and UTC

The same moment can look different depending on the timezone used for display.

  • Use UTC for logs and APIs when possible.
  • Use local time when explaining dates to people.
  • Include timezone information in shared reports.

Test both directions

When debugging time data, convert epoch to date and date back to epoch to catch unit or timezone mistakes.

  • Check current time as a known reference.
  • Compare ISO output with local display.
  • Be careful around daylight saving time.

Related tools