-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use RFC3339 for Timestamp #522
Conversation
Tagging those who were active in #519 |
IMO we should just get it right the first time. If it's going to be a breaking change and every language has a library that handles this nicely why not just do it? |
That would of course be okay for me. |
I agree with @benwedge let us not do it half way. |
I support the proposal, including variable offsets. |
Thanks all for chiming in. I will wait until the end of today and if no one shows up voicing opposition to variable offsets I will update the PR. |
Since no-one has shown up who is against variable offsets, I have updated the PR. |
74faa7f
to
3489296
Compare
I (as proxy for @leonardehrenfried who is on vacation) hereby call a vote on this proposal. Voting will be open for 10 full calendar days until 11:59PM UTC on August 5th. |
Entur votes in favor of this proposal and will implement it |
We (Where To?) are in favor, too, and will implement it. |
transport.data.gouv.fr is in favour and will implement it (for feeds we consume) |
Joyride (provider) is in favour and will implement this when we move to 3.x |
Not sure if my vote counts but OpenTripPlanner will implement this via Entur's Java library. |
This vote has now closed, and it passes! Votes in favor: |
Datetime is currently Datetime definition in the spec: Datetime only usage is in vehicle_status.json for |
Good catch @richfab - I think for most practical purposes they are the same, but the spec should definitely be consistent. The ISO is very broad, so I would be in favor of restricting it to the RFC (which is a profile of the ISO standard?) |
My suggestion is to combine the two, so all of them will be of type Timestamp or DateTime. I have a slight personal preference for the name DateTime but I'm fine with both. |
@josee-sabourin What is the process of merging this PR? I would prefer to merge this and then make a follow up where I combine the two types since that would be a non-breaking change. |
@leonardehrenfried currently we are waiting to merge pending a few more potential breaking changes to limit the number of v3.0 release candidates we have. |
Note that RFC3339 allows |
Hello @hbruch, Great question. For reference, this is the extract from the RFC3339 spec:
What is everyone's opinion about:
Thank you! |
I would be fine with not supporting the full flexibility of the spec and require them both to be mandatory and upper case. (Z can of course be replaced with an offset). |
We're strongly preferring to restrict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If you are new to the specification, please introduce yourself (name and organization/link to GBFS). It’s helpful to know who we're chatting with!
I'm a core developer of OpenTripPlanner, a multimodal transit routing engine with GBFS support.
What problem does your proposal solve? Please begin with the relevant issue number. If there is no existing issue, please also describe alternative solutions you have considered.
Right now GBFS uses seconds since the epoch as a timestamp, for example in the last_updated field. While this practice is pretty wide-spread, it makes debugging feeds a little harder than necessary.
Every time I need to check the last_updated field I need to copy the epoch seconds, google "epoch to time converter", paste the seconds to get a usable date time.
While this isn't an impossible task, I think there are alternatives that are both human-readable and unique so that machines can identify a universal point in time.
What is the proposal?
Replacing POSIX time with RFC3339 makes a much more pleasant debugging experience for humans and doesn't add ambiguity for computers.
An example of RFC3339 time is
2023-07-17T13:45:29+02:00
.Is this a breaking change?
Which files are affected by this change?
All of them. 😳
Timezone
It was suggested in #519 that we should limit the offset/timezone to UTC, so an offset of 0 or aZ
at the end.Personally, I'm not in favour of this restriction as you should use a proper date parsing library which handles all offsets, but as time is tight I would like to keep the discussion to a minimum and not let this point block the proposal.EDIT: Consensus was reached to include the offset/timezone in this PR.