- Founder/Site Admin
- Posts: 1243
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
In all TD versions, the TD implementation is incorrect. Including the latest TD 6.3.
First a list of possible XML DateTime example values:
In all cases, the datetime in TD should be:
Right now, only B) and D) are correctly converted.
Examples A) and C) will result in:
Looking at the implementation, the cause is clear.
Set sXMLParsed = '1900-01-01-' || sXMLParsed
should be done AFTER the checks for Z, + and - and not before.
Right now, the '1900-01-01-' part of the string will be used to check if it contains a - sign. This is always the case and it results in an invalid datetime.
Even the corrected functionality is incorrect as it just strips Z, + and - signs from the DateTime. There is a reason why these characters are there.
When TD converts the XML value it should REALLY convert to the timezone and daysavings of the system it is running on.
See sample (saved in TD51 format). Select the XML value in the combo and execute. See the datetime result in the field.
All the dates are the same.
Who is online
Users browsing this forum: [Ccbot] and 0 guests