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



Neither of those two solutions are correct. They only work in a some cases. You need a more advanced detection algorithm for this. Preferably one based on the Olson database, since time zones have changed over the years and you want to be able to display past dates correctly.

This solution linked from your second link looks more correct.

https://bitbucket.org/pellepim/jstimezonedetect/src/e265c8ed...

But still I am not sure if this is the right way to do it.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: