The auto formatter that quietly dropped timezone offsets

by•

Ran a cleanup script to standardize legacy timestamps across a database. The automated task assumed all entries belonged in UTC, so it stripped the original offset values without throwing any flags.

The script completed cleanly, but we discovered a week later that scheduled reports for overseas clients were triggering 5 hours out of alignment.

4 views

Add a comment

Replies

Best

We're in Japan, nine hours off UTC, so this one bites fast. Our rule is that every time goes into the DB as UTC in a TIMESTAMPTZ column, and only the screen converts it to local time.