09-04-2015 09:48 AM
Hooovahh - in your example, it appears that it does not show the hour time offset at the end of the ISO "Z" specifier. When I run that VI, I get this:
2015-09-04T14:46:27.022Z
Shouldn't it be 2015-09-04T14:46:27.022-4:00?
09-04-2015 09:52 AM
@Eric1977 wrote:
Shouldn't it be 2015-09-04T14:46:27.022-4:00?
Oh not sure, I just copied the string from the LAVA link. The one I did apparently shows the time as UTC.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-04-2015 09:55 AM
@Eric1977 wrote:
Hooovahh - in your example, it appears that it does not show the hour time offset at the end of the ISO "Z" specifier. When I run that VI, I get this:
2015-09-04T14:46:27.022Z
Shouldn't it be 2015-09-04T14:46:27.022-4:00?
I'm not too familiar with this specific format, but I know if you make it %Z, you end up with the timezone specifier. I'm not sure how to get the offset like that.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
09-04-2015 10:09 AM - edited 09-04-2015 10:12 AM
@James.M wrote:
I'm not too familiar with this specific format, but I know if you make it %Z, you end up with the timezone specifier. I'm not sure how to get the offset like that.
I never realized this but I'm guessing this was the intention. Looks like someone needs to update their signature.
EDIT: It looks like lower case z is close.
http://zone.ni.com/reference/en-XX/help/371361J-01/glang/codes_for_time_format_str/
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-04-2015 10:12 AM - edited 09-04-2015 10:13 AM
But he's in the 500 club.
It seems like maybe there was a syntax change at some point? Why would all the people in that thread go along with the method posted there if it didn't spit out the timezone correctly? There are snippets and everything. Did nobody test it??
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
09-04-2015 10:15 AM - edited 09-04-2015 10:15 AM
Maybe it didn't matter since it was already UTC? So you could just add -0:00? Easy to miss, I guess. I didn't realize until today that is was required to be part of the ISO format for time.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-04-2015 10:20 AM - edited 09-04-2015 10:20 AM
The %z seems reduntant because the "^" makes it UTC. Without that, I get "2015-09-04T08:17:16.082 -07:00:00" (with current time used), in which case the offset is nice to have.
Meh, I think people in that thread must not have known what they were looking at. Hopefully Eric here can make due with %z.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
09-04-2015 10:23 AM
@James.M wrote:
Hopefully Eric here can make due with %z.
Yeah if not you can still do some string parsing and remove the last three characters. I tried converting it back and it seemed to work.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-04-2015 10:32 AM
09-04-2015 11:21 AM
So I pinged someone in that thread and they knew what they were doing and we didn't.
The "Z" at the end indicates that the time is in UTC format, and there for the timezone information isn't needed. This is aparently correct for the ISO 8601 standard.
So one form that is valid is:
2015-09-04T11:52:51.049-04:00
Another is:
2015-09-04T15:52:51.049Z
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord