10-19-2009 08:58 AM
Hi,
I have to format a time in ISO8601
It should look like: YYYY-MM-DDThh:mm:ssTZD (1997-07-16T19:20:30+01:00)
I am able to format it to UTC without the TZD (Time Zone Designator)
In Germany there is +01.00
but now we have summertime +1h so it is equal GMT +00:00
Is there a way to get the TZD in TestStand
Juergen
10-20-2009 04:59 AM
Hi Jürgen,
maybe this helps:
Accessing Windows Time Zone Information Through LabVIEW
Regards,
10-20-2009 07:15 AM
Juergen,
Another reason why you should use LabVIEW rather than that C "what's it stuff"
10-21-2009 01:16 AM
Hi Ray,
It seems in this case the LabView Example( Thanks Andreas! ) will not fit all my needs.
In my Post i did a misstake! About adding the summertime
I Said if you push 1+ Then GMT(+1) + Summer(+1) = GMT(+0) Seems i have to go back to primary school
a learn some mathematic fundmentals.
I need a simple function that gives my local time in against UTC.
Example:
If you are in Greenwich, New York, Berlin(Winter), Berlin(Summer) and get your local time at THIS moment
You will get:
Greenwich 10:20:30+00:00
NY 05:20:30-05:00
Berlin(Winter) 11:20:30+01:00
Berlin(Sum) 12:20:30+02:00
So getting the local time is very simple Teststand Time() will do it!
But now i need to determine should i add +01:00 or +02:00
Juergen
10-21-2009 02:35 AM
Jürgen,
so you don't want to get the local time, but you need to read out the difference to UTC?
Regards
10-21-2009 10:07 AM
Hi Andreas,
No, I want to get my current local time and the deviation to UTC
Here in Germany it is +1:00 (Winter) +2:00(Summer)
I need an API that should give me +1:00 / +2:00
or if i am in NY -5:00
See this link on chapter 5.3.4.2
http://xml.coverpages.org/ISO-FDIS-8601.pdf
Juergen
10-21-2009 11:20 AM
The mentioned example shows how to read the bias using Windows' kernel32.dll. The function is GetTimeZoneInformation.
Regards,
10-23-2009 10:32 AM
Will this VI help?
http://decibel.ni.com/content/docs/DOC-7199
10-23-2009 11:59 AM
11-14-2023 11:56 PM
More developement work has been done here and shared as open source project. A very comprehensive set of time zone libraries. You can also find the package via JKI VI Package manager by searching for "Epoch"
https://github.com/LabVIEW-Open-Source/Epoch-Time