Hacker News new | ask | show | jobs
by grecy 5044 days ago
> Now, Twitter uses the format "10:42 PM - 15 Aug 12"

Wouldn't including the relevant timezone be even better?

1 comments

That would be very helpful actually! Good point.
If you figure out how to do that without it being an account setting option, you let me know.
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.