Hacker News new | ask | show | jobs
by codetrotter 1042 days ago
They are rendering the timestamp with JS.

JS has the ability to see system time zone offset.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

It’s not difficult to send the time zone in UTC, and convert it client side to local time zone.

And since they do “x minutes ago” kind of things they are certainly using a library. They are probably passing in “naive” timestamps without TZ info into a library that is perfectly able to handle it correctly for them, had they just read the docs for the library they used and taken a moment to make sure that they include TZ info.

And if everything was done server side it would likewise be similarly easy to get it right because then my own time zone does not matter.