3 ms·
At the infrastructure: yes, all servers should be UTC, (almost) no question. As for guessing timezones - I use GeoIP to get the user's approximate location, th
by mryan 14y ago
At the infrastructure: yes, all servers should be UTC, (almost) no question.
As for guessing timezones - I use GeoIP to get the user's approximate location, then figure out the timezone based on that. It is not perfect, but I needed something that does not require JS.
- ecesena 14y agoright, geoIP is another interesting solution... the best is to combine several guessing techniques, when available
- zmillman 14y agoIf you don't need the user's timezone immediately for their first request (which I assume is why you can't use a javascript solution), using getTimezoneOffset() works pretty well. Shameless plug: I wrote a gem to handle this in Rails ( https://github.com/zmillman/browser-timezone https://github.com/zmillman/browser-timezone )