Closed juliuste closed 6 years ago
@derhuerst Anything from our discussion that I missed out on?
"overwrites" should be changed to "overrides" to be less confusing.
One downside of this is that it's going to be "harder" to calculate delay information and people might screw up when subtracting dates [...].
For me this is sad, but I don't have any better proposal. And I think enabling new use cases for FPTF is worth making the mentioned case harder to deal with.
See also #5, this is a pretty problematic issue with FPTF right now.
Moving discussion to #61
When discussing how to handle
when
anddelay
forcanceled
trips in #27, @derhuerst and I became aware of a bigger problem when trying to express time data in FPTF.There are three possible types of time data you can get from any API/system:
The current
when
+delay
works well for 2., but things become less clear when you only have either realtime or scheduled time data. In both cases,delay
has to benull
, but only if you have realtime information,when
is accurate. In other words: There should be a way to differentiate between scheduled and realtime data if only one of them is available.After discussing
formerScheduledWhen
forcanceled
trips, @derhuerst and I came up with the following proposal:Instead of
delay
andwhen
, we introduce two new fields calledscheduledWhen
andrealtimeWhen
. Only one of them is required, if both are set realtime overrides scheduled. This accomplishes our main goal of forcing people to handle both cases properly and should be easier to understand.One downside of this is that it's going to be "harder" to calculate delay information and people might screw up when subtracting dates (IMHO this is not a dealbreaker, though). Another "bad" thing is that this would be a breaking change.
Opinions? Other proposals? We probably missed something again, I can feel it 😄