Current Unix timestamp: seconds or milliseconds?

Both are correct — they’re just different units.

// JavaScript
const ms = Date.now();
const seconds = Math.floor(Date.now() / 1000);
Unit safety tips
  • Name fields explicitly: created_at_ms or created_at_s.
  • Store one canonical unit internally and convert at boundaries.
  • Reject impossible ranges in validation.