Fix invalid Logbook timestamps and show date/time in server timezone - #2
Merged
Conversation
Timestamps were unparseable because the code appended "Z" to already-offset-qualified ISO strings from the API (e.g. "...+00:00Z"). Also fixes the displayed time to a fixed America/New_York zone with an explicit abbreviation, so everyone viewing the Logbook sees the same time for the same event regardless of their own browser's timezone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
...+00:00), but the frontend was appending aZsuffix unconditionally, producing an unparseable string like...+00:00Z.America/New_Yorkwith an explicit zone abbreviation (e.g.07/03/26, 06:09 PM EDT), so everyone viewing the Logbook together sees a consistent time for the same event regardless of their own browser's timezone.Test plan
nodeon the server that the fixed parsing/formatting logic produces correct output against real/api/logbooktimestamps