However, this is IMHO still a workaround (one I intend on using though)... the time stamp control is defined as UTC, so when I poke around with it to get the format function to work the way I want I am in effect going against the definition of the time stamp control. If I started passing this modified time stamp around, things could get *quite* confusing. So to the fellows at NI... isn't it about time we got a little more control over the format date/time into string function? Just adding two inputs, one for whether to use daylight savings and another for which timezone to use would probably cover most needs... and if unwired, there terminals could default to the system settings. That way the new features would not have to break existing code. Just a thought.
George
At 02:55 PM 5/21/2004, you wrote:
The "Get Date/Time in Seconds" function returns a time stamp control that appears to contain the local date and time. Is there a way to convert this to UTC without doing a bunch of crazy tail math / logic? I mean, to do it correctly required a lot of "thinking" to account for daylight savings, leap seconds, and so on... I hope I am overlooking something very trivial. I would prefer to avoid having to make OS calls to query the local time zone, etc if possible. Our system clock is steered by a GPS time server, so the system time is fairly accurate, but for convenience is also in local time. However, we would rather use UTC for creating file names and for timestamps in the files to avoid possible conflicts surrounding the crossover to standard time. (Some of our processes are now 24/7 so this is something we have to consider.)
George Gatling Applied Technology Division, SFA Inc. Space Physics Simulation Chamber US Naval Research Laboratory 202-404-5405 (phone) 202-767-3553 (fax)
If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason. --Jack Handy
George Gatling Applied Technology Division, SFA Inc. Space Physics Simulation Chamber US Naval Research Laboratory 202-404-5405 (phone) 202-767-3553 (fax)
If trees could scream, would we be so cavalier about cutting them down?
We might, if they screamed all the time, for no good reason. --Jack Handy
