Repository navigation
Write every timestamp through one converter - #93
Merged
Merged
Conversation
Two converters wrote timestamps: rfc3339 in timestamp.go parsed a value the backend returned and wrote it with Go's RFC 3339 layout, a UTC instant as Z; rfc3339Tz in main.go completed the hour-only offsets inside the MF-JSON MobilityDB writes, a UTC instant as +00:00. The response time of a TemporalProperties document and the bounds of a Part 4 window were written by a third and a fourth route, as Z, the bounds of a count window being the records' times as received. rfc3339 is the one converter, writing an instant with its offset in hours and minutes as the backend stated it, rfc3339Layout. rfc3339In applies it to every timestamp a JSON document holds, which ogcify and the Server-Sent Events stream call; the time series and trajectory readers, the response time and the window bounds use rfc3339 or rfc3339Layout. rfc3339Tz and its regular expression are gone, and its test cases are rfc3339In's. Every timestamp of the samples is written +00:00.
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.
Every timestamp MobilityAPI writes goes through one converter,
rfc3339intimestamp.go, in one form: theTseparator, fractional seconds when present, and the offset in hours and minutes as the backend stated it (rfc3339Layout), so a UTC instant is+00:00.The routes it replaces
rfc3339(timestamp.go): extents, a feature'stime,Content-DatetimeZrfc3339Tz(main.go): the hour-only offsets inside the MF-JSON MobilityDB writes, and the Server-Sent Events+00:00timeStampof a TemporalProperties document (time.RFC3339)ZunixRFC3339), and of a count window, the records' times as receivedZThe change
rfc3339writesrfc3339Layout.rfc3339Inapplies it to every timestamp a JSON document holds;ogcifyand the Server-Sent Events stream call it.rfc3339; the response time and the window bounds are written inrfc3339Layout, a count window's bounds throughrfc3339.rfc3339Tzand its regular expression are removed; its cases areTestATSTimestampsInADocument, againstrfc3339In, with aZinstant and a space-separated one added.TestATSTimestampIsRFC3339and the window-bound expectations ofTestMeosWindowBoundsandTestMeosTumblingWindowstate+00:00.Zare written+00:00, so all 34 of them carry one form.