Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My understanding is that timestamptz basically does what you want but better. It takes a timestamp in the timezone set in the client, and automatically converts it to UTC for storage, and any other client gets it in their local time based on the value their timezone is set to on their connection or session.

It basically lets you fold all the logic of converting datetimes into UTC and back out of UTC to local time for display into the DB itself. Worst case, if you want UTC and to do it in the application logic, just set your connection timezone to UTC, and you'll be expected to provide and get back UTC times.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: