Settings

Theme

Ask HN: What timezone should I use?

1 points by andrejewski 14 years ago · 1 comment · 1 min read


The application I am building projects the time on which data is submitted and I would prefer the time to be stored in a unified timezone, calculated for the user and sent based on their timezone. I have all of this worked out, but I would like to pick the best timezone to store the data in. I was thinking Greenwich, but is there a better option? I am in EST, right now.

PythonDeveloper 14 years ago

You want to use UTC and convert it to your local timezone using functionality provided in most of todays languages.

For example, in PHP, you could use gmdate('Y-m-d H:i:s') to get the current time/date in UTC.

In Python, you could use datetime.datetime.utcnow().

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection