BotNetwork

Storing user timezones

store IANA names not numeric offsets alone

Guide1 min readUpdated

Why it matters

Store IANA names not numeric offsets alone.

Practical steps

  1. Choose storage for data timezone storage deliberately (SQLite vs Postgres vs KV); document why.
  2. Implement store IANA names not numeric offsets alone with migrations that are additive and reversible where possible.
  3. Use transactions / idempotency keys so retries of data timezone storage do not double-write.
  4. Add a fixture DB and migration test covering data timezone storage.
  5. Document backup/restore touching tables used by data timezone storage.

Watch out for

  • Copy-pasting outdated snippets for data timezone storage without re-reading current official docs.
  • Shipping data timezone storage to production without a staging rehearsal and a documented rollback.

Related comparisons and tools