racket / racket-pkg-website

A frontend for the Racket Package Catalog.
Other
9 stars 15 forks source link

Display local time whereever times are shown #43

Open tonyg opened 7 years ago

tonyg commented 7 years ago

Times currently shown in UTC cause confusion occasionally for users not in UTC (which of course includes people in UTC+1 and UTC-1 fairly often, where mixups are especially easy to make!).

The big example is the "when is the next refresh" indicator, but others would also be nice to have in the local (browser) time zone. I reckon this could be achieved with a bit of judicious javascript plus sticking a class/attribute onto every displayed timestamp.

jackfirth commented 7 years ago

There's a <time> tag in HTML5 that can be combined with some javascript to do this (see this blog post for a simple example)