6 ms·
If 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()
by zmillman 14y ago
If 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 )