Peter_S Posted May 13, 2014 Report Share Posted May 13, 2014 Hi, Is there an option to save a timestamp as UTC xml string ? Example: <Time_Stamp>2014-05-13T11:40:36.121Z</Time_Stamp> Peter Link to comment Share on other sites More sharing options...
Ashish Posted May 14, 2014 Report Share Posted May 14, 2014 Peter, You can easily convert the timestamp in UTC xml string by using "Easy Write XML File" function. Just wire the timestamp and destination file path to it. Link to comment Share on other sites More sharing options...
Peter_S Posted May 14, 2014 Author Report Share Posted May 14, 2014 Hi Ashish, then I get the local time with UTC offset ( which is not correct because the 1 hour DST offset is missing): <Time_Stamp>2014-05-13T13:40:36.121+01:00</Time_Stamp> The UTC Format <Time_Stamp>2014-05-13T11:40:36.121Z</Time_Stamp> is not possible? Peter Link to comment Share on other sites More sharing options...
Ashish Posted May 22, 2014 Report Share Posted May 22, 2014 Peter, You can use the "Format Date/Time String" function to build the desired UTC format string and then use EasyXML to generate the XML string. See attached snippet for reference. Here is the time format string I created: %Y-%m-%dT%H:%M:%S%3uZ Link to comment Share on other sites More sharing options...
Peter_S Posted December 12, 2014 Author Report Share Posted December 12, 2014 I know. But why I use EasyXML. It can create XML from clusters: But the UTC Offset was in September +02:00 ! Easy XML use not UTC Offset from the time value. And you see I fixed the bug "Timestamp decimal is no period". For my LV 2012 installation I fixed also your UTC offset bug. So correct is: The problem was: I had to read the times in c# and with your bug is an hour offset! It would be very usefull, also for other users, if you fix the bugs in the offical packages (eval + registered). Link to comment Share on other sites More sharing options...
Ashish Posted December 15, 2014 Report Share Posted December 15, 2014 Peter, Thanks for documenting your observations and the fix. I will pass on the information to the team for consideration. Link to comment Share on other sites More sharing options...
Vikas Barai Posted January 15, 2015 Report Share Posted January 15, 2015 Peter, I have created the exact VI as you showed in the image , but it is not updating the adjustments of UTC . In that image in front panel inside "data" is the result you are getting or are you showing the expected result you want ? Because by following your steps I am not getting the desired output. I am attaching my VI please check where I am going wrong. Thanks utc.vi I know. But why I use EasyXML. It can create XML from clusters: But the UTC Offset was in September +02:00 ! Easy XML use not UTC Offset from the time value. And you see I fixed the bug "Timestamp decimal is no period". For my LV 2012 installation I fixed also your UTC offset bug. So correct is: The problem was: I had to read the times in c# and with your bug is an hour offset! It would be very usefull, also for other users, if you fix the bugs in the offical packages (eval + registered). Link to comment Share on other sites More sharing options...
Peter_S Posted February 10, 2015 Author Report Share Posted February 10, 2015 I have created the exact VI as you showed in the image , but it is not updating the adjustments of UTC . In that image in front panel inside "data" is the result you are getting or are you showing the expected result you want ? Because by following your steps I am not getting the desired output. Hi Vikas, in the official EasyXML Package is the bug: the utc offset doesn't depend of the input time. It is calculated from a fixed date (1/1/1904). For me in europe it is always +01. But for a time inside daylight saving it should +02. For me I fixed this UTC offset bug ( remove vi password - see hmilch.net, search the bug, fix the bug...) Easyxml is closed source, so I can not publish the fix. Peter Link to comment Share on other sites More sharing options...
Peter_S Posted January 5, 2016 Author Report Share Posted January 5, 2016 Hi, now is EasyXml at github. I made a pull request with the fix https://github.com/JKISoftware/JKI-EasyXML/pull/1 Peter Link to comment Share on other sites More sharing options...
Rickardo Posted March 21, 2016 Report Share Posted March 21, 2016 Hi Peter, I have the same issue writing timestamp to xml using the toolkit but am unsure on how you got around it?? I have also contacted the JKI team to see if there will be a fix to the toolkit. It is causing me a lot of headaches, would you mind sharing your workaround in a little more detail so that I may possible do the same?? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.