codefornola / nola-transit-map

Realtime view of all NOLA public transit vehicles https://nolatransit.fly.dev/
MIT License
20 stars 6 forks source link

Display relative human readable timestamp in popup display for map markers #4

Closed nihonjinrxs closed 2 years ago

nihonjinrxs commented 2 years ago

This PR updates the popup display to use human-readable relative timestamps ("less than a minute", "1 minute ago", etc.).

This was done collaboratively by myself, @wwkeyboard, @thewarbo, and @TaraT1.

bhelx commented 2 years ago
Screen Shot 2022-11-10 at 9 13 34 PM

Looks good on my machine. let's ship it!

bhelx commented 2 years ago

Well this exposed a bug in my code. When deploying it was suspiciously off by 6 hours (which is the same offset as central timezone) so I realized i made a mistake on backend by not parsing the timzeone as central.

Screen Shot 2022-11-10 at 9 24 43 PM

It was set to Local which for the server is UTC but for our computers is Central: https://github.com/codefornola/nola-transit-map/commit/2b76ca02906e3765c02f6bc8f4293d8b87efdd1f.

Should be fixed now, thanks for the contribution! Just load up https://nolatransit.fly.dev/ and do a hard refresh.