Jump to content

Save Timestamp as UTC xml string?


Peter_S

Recommended Posts

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

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

UTC_Time_Format.png

Link to comment
Share on other sites

  • 6 months later...

I know. But why I use EasyXML. It can create XML from clusters:

easyxml.png

 

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:

 

 

easyxml2012.png

 

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

  • 5 weeks later...

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:

easyxml.png

 

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:

 

 

easyxml2012.png

 

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

  • 4 weeks later...

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

  • 10 months later...
  • 2 months later...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.