Hacker News new | ask | show | jobs
by Rafsark 1042 days ago
What would you expect as a fix? How do they know about the timezone you are currently on? Not an easy fix in my opinion as they have to be aware of your timezone (or ask for it) anytime you post
1 comments

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.