-
Notifications
You must be signed in to change notification settings - Fork 2
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
Timezones in start-date, end-date and birth-date #28
Comments
I understand that for some cases, simply ignoring the timezone could cause discrepancies, though we haven't encountered it yet, when exchanging with partners. |
I'm not sure if restricting xs:date wouldn't cause too much implementation problems to developers. I believe that sticking too common types is a better choice, even if it means that some restrictions are only in the documentation. I would suggest adding that the server MUST NOT use timezone for those fields and that the client MUST ignore timezone if present despite the restrictions. |
DIscussed during the IF meeting on March 15, 2023. |
@mkurzydlowski can you please explain this point with an example data on how sender and receiver should act. |
Sender MUST NOT send those dates as 2020-01-01+02:00 but rather 2020-01-01. |
If it is MUST for sender then why would there be a date with format "2020-01-01+02:00"? Receiver MUST reject it, if the format is "2020-01-01+02:00". Why do we want to create this confusion? |
There is never a possibility to reject bad get response. As a client we always have to deal with the data we receive. We might either try to interpret it, when the data is almost valid (like here), or hide it from the user with an appropriate message. I propose ignoring the timezone (and reporting the issue to EWP reporting tool) but from your response I see that you want do discuss an approach were we mandate not processing an LA get response that uses timezone in a birth date? PS. I don't see much confusion in my proposal. I just wanted to specify an edge case so it is appropriately handled by the client. |
There should be no scope of such case. By adding such description you are diluting the requirement. If there is some wrong data passed by the sender, receiver should show it in error to their clients and not ignore it. Sender needs to fix it, rather then receiver ignoring it. This is how it should be everywhere. EWP is at a stage where strict checks are needed from both sender and receiver side. |
I'm not voting against your proposal, so lets hear other voices. |
You don't have voting rights anyway. Neither myself ;) |
Just to add. Sender is a sender for n number of receivers. So it is better sender fixes it, rather then n number of receivers making changes to ignore it. |
On the one hand I agree with your strict rule. On the other there are some evident fatal errors (like email which is a MUST and does not pass validation) and some non fatal, where the meaning is obvious (like birth date with time zone). In the second you may show the warning but nevertheless accept the answer and process it properly. I see two options to vote, let's wait, may be more will show up.
That's of course true. This is the reason for the MUST on the sender side. |
This is going to be redundant. There will be no such case. We will not accept it and there will be no option for the sender but to comply and make changes, because most likely they would be partner with at least one of our client.
|
By the way, that's a great opportunity to remind all that in monitoring you can see what kind of erroneous data, not compliant with the specification, which have not been validated on a server side, are send to the client and then reported in the tracking system. Go to Stats portal and use the URL below replacing $$$ with the your name as the provider https://stats.erasmuswithoutpaper.eu/monitoring?date_from=2023-02-01&server_provider=$$$ |
This is good. We will check and fix any error on our side. |
As mentioned in erasmus-without-paper/ewp-specs-api-iias#108 (comment), according to recommendations of DG EAC, this set of changes to the family of IIA APIs will be issued as the major stable release. There will be enough time for all to implement the planned set of changes. Which means that we can choose more strict rules and follow the proposal: a sender MUST NOT SEND time zones in the discussed use cases, a receiver MUST REJECT dates with time zones in the discussed use cases. |
This issue has propped up again in recent IF call. Was anything finalized? Is timezone allowed in fields like DOB? If so then what date should be taken as DOB as asked by Jiri when raising this issue. |
Why do we use the XML language if we keep on using a particular data type and in the documentation we add restrictions that have nothing to do with the XML philosophy?
The above code should avoid any misunderstood: the date can only be valid or not valid, it cannot be valid for someone and not valid for someone else. (the same for the xs:language if you want to exclude UND you have to rewrite the type as a list of allowed values). |
Hi @demilatof .. I do not think DG EAC is interested in making changes to the specification anytime soon. The question was without changes in the specification how should this be interpreted. I thought this was already discussed and confirmed by DG EAC in IF call. I am just looking for what was approved by DGEAC. If the decision was to allow timezone in date field, then which date must be shown to the end user, "2020-01-01" or "2019-12-31". Coming to future changes to the specification. Since timezone is optional xs:date, mention of restriction in documentation goes fine with XML language definition. I would have agreed with you if timezone was mandatory. |
I agree with the proposal of @mkurzydlowski Dates MUST be sent with no time-zone. In case this is not possible because we don't want more changes in the specification, at least it should be RECOMMENDED. In any case, clients MUST ignore those time-zones. I would bet that in 99% of cases these time-zones are added silently by the API implementations depending on the development language or library, and the developers and users are not aware of them. |
Did a quick search for Java and found below for sender to use. Not an expert so please correct it this is wrong. Similar to this change would have to be done at the receiver end. So what is the challenge to say that sender MUST not sent timezone in a date field?
|
Hi Umesh, the challenge is plain and simple: xs:date is based on an ISO specification which is a standard. You cannot restrict an ISO standard and and cannot change it. BTW, where is the problem in adopting a standard correct, library, compliant with the standard and trying to stop using an hand made parser? |
To answer your point let me point to
Even though the type is xs:string, but the actual value in is governed by the xs:documentation. And there are many such examples. So I am not sure how all of a sudden there is concern about being strict on standards. For now all we need to know what date to be shown to the end user when DOB is received like "2020-01-01-02:00". Is it we show 2020-01-01 or we show 2019-12-31? Unfortunately DGEAC has not been able to answer this. |
"MUST parse it". Where does the specs say how to parse it? And if there is nothing in specification about it, so where is the question of MUST?
|
Hi, |
But this is the old coding fashion, when there was not internet and someone developed a software to spread to everyone. The problem is that someone most probably compares dates by string or, worst, parse XML as a string and not by mean of a proper tool that should solve the Timezone. According to all who complain about the problem, there is no way to book a flight due to the different time zone. |
Can someone help answer this. I keep hearing that DG EAC reads these discussions and are eager to participate. If they are reading, can they answer this? |
is the problem just this one? only need a response from DG EAC? so the problem is not to receive a time zone if i understand well ?! |
How is this question related to the basic question of how to handle such dates. |
thank you for your no answer . i asked because usually we discuss problems not auto-genereted problems. |
We are not responsible for your wrong coding; if you want to parse manually the XML string, please ask how to do in some W3C's forum.
java -classpath .:./lib/* xml.testxmldate.TestDateToXml 2020 01 01 > example.xml you can add -Duser.timezone="GMT-2" to simulate whatever default system timezone Then you can launch java -classpath .:./lib/* xml.testxmldate.TestDateToXml example.xml to read again the file (that, by default, have the timezone inside) adding eventually -Duser.timezone="GMT+10" to simulate a different received system time. Finally, you can also edit the xml and completely remove the time zone from it, leaving 2020-01-01 I hope that this can close the question, stressing out that if a standard type is used, it's a hazard thinking to limit it by words. |
I am sorry, I have still not understood. My clients work on different time zones. How will it always return 2020-01-01 unless you force some logic to always return 2020-01-01. If I just pass a datetime into any language library function it will convert to system time zone or the timezone you want to convert it into. How will it always return "2020-01-01" unless you forcefully want to get that value. |
Lets take an example, if I get 2020-01-01+05:00, my mysql DB field is a date and not datetime . So I convert this to UTC 2019-12-31T19:00 UTC and save 2019-12-31. This is what will be show to the end user. |
Because you always have an object that is a couple of (date, Timezone). Everything is happening later is yours matter, you don't have to get 2020-01-01 and convert in your time zone, you have to manage 2020-01-01 as it is, as a varchar in your DB if you're in trouble with different time systems of your client, but this part is outside the EWP. |
So the end user will be shown DOB in timezone like 2020-01-01+05:00 or 2019-12-31T19:00 UTC and not YYYY-MM-DD? |
Why do you want to show a time zone to the end user? |
So the whole point is that I remove the timezone from the date field and use it everywhere. And all this while I was thinking there is some magic ISO library (claimed by Janina) that will give the correct date irrespective of timezone. This is exactly what I mentioned can be done on sender side in my comment here #28 (comment) . And this is what I was asking, where does the specification say to remove the timezone and then use the YYYY-MM-DD part of the date. |
We ignore/remove the timezone if the server includes it in the response. |
Ok. Every one pointing to the custom parsing, which is to treat the incoming date with timestamp as a string, strip out the timestamp part and use the YYYY-MM-DD. |
Where? I said
This has been very precisely demonstrated by @demilatof. |
https://www.w3.org/TR/timezone/#guidelines
https://www.w3.org/TR/timezone/#xmlschema Now you have even the W3C's official position. |
@demilatof @janinamincer-daszkiewicz You answered what I was saying. Sender MUST Omit. Thanks. So lets get this fixed from sender side.
|
This is what ISO standard says. Thanks to @demilatof and confirmation from @janinamincer-daszkiewicz . Can you please point to any other specification.
|
I think you had your answers; if you use on of the tool already available, you will have nothing to do, just pick the date. |
EWP community also has some providers who are quite selective in pointing the wrong of a particular implementation and defending the wrong of some other implementation, as and when it suits them. |
Please, read carefully, you are only trying to put in a mess something that is clear:
https://www.w3.org/TR/timezone/#guidelines
https://www.w3.org/TR/timezone/#xmlschema If you or your tool can omit the Timezone value, avoiding to be shown in the element, do it. |
Not sure where you read this "If you or your tool can omit the Timezone value". If your tool is not designed to OMIT as per the standards that you only pointed to, how is it a problem of EWP. As you said earlier, "this part is outside the EWP". |
Problem is yours, because I and many others don't have any problem. |
I don't want this to get dirty so will stick to logic. Asking again, where did you find "If you or your tool can omit the Timezone value"? You cannot interpret something that is not said just to defend your point.
What the above points mean is system A MUST OMIT timezone when sending, system A MUST ignore timeone when receiving and system A can use UTC internally. So it is very clear that the interpretation of above 3 points is are applicable to single system. What Mr @demilatof is trying to do is, mislead by saying that system A can send timezone and system B should cover for it by ignoring it. |
Again, it's your problem. If you see 2020-01-01 in the element, it's always 2020-01-01 without a time zone or with a whatever time zone. |
Please read above again. Problem is that you do not want to listen beyond what you have decided at the start of the discussion. Anything beyond what you have fixed in your mind is others problem. W3s does not say what you want to pick and choose. So please stop misleading on what W3s says. Unless there is any other specification that you want to quote I can have further discussion. Else I will pause on to this W3s specification which is clear on how individual system must behave for such dates. |
Please, stop seeing in other your problems and start reading and studying, before ending in a ridiculous situation.
W3C says (as you can read at the pages I linked above, if you open your mind and read them):
All that said, my selective thinking has just decided to select you out because you're only trying to find a way to justify your poor coding; and even this is your problem. |
Here the discussion is about specification and not about MoveOn. |
The specification tells you to use a "xs: date", that represents a Gregorian calendar date as defined in ISO 8601 according to W3C recommendation. About this issue, the specifications are enough, nothing to discuss. If you and MoveOn are the only ones in trouble, the problem must be looked for in your code. |
Back to circle one and same rant again and again. Nothing concrete. Not worth responding to you. MoveOn will do whatever is correct as per specification. But that does not mean others can be allowed to screw. Finally I will pause. |
Summary presented during the IF meeting on 2024-11-13:
|
During testing I encountered a server which sent timezone information in the start-date, end-date and birth-date elements, for example the value 2020-01-01+02:00. While this seems to be a valid xs:date value, I think that there is room for a potencial error on the side of client implementers from timezones west to the location of the server, because the above value can easily be parsed as 2019-12-31+01:00. If I understand it correctly, the xs:date type represents a time-zoned 24 hour interval and in this case it implies that the student was born or is about the start/end the study in the timezone of the server. But that may not be true. Wouldn't it be safer to restrict the format of these three fields to the YYYY-MM-DD format without timezone?
The text was updated successfully, but these errors were encountered: