06-22-2020 08:15 AM - edited 06-22-2020 08:16 AM
Hi sorin,
@sorin1 wrote:
For example, if UTC date&time is March 26, 2020 16:50:04 (UTC), the value is 3668086204 seconds
Like this?
06-22-2020 08:21 AM
yes, but I need to get current date/time from PC (UTC, not local) and then converts it into seconds
06-22-2020 08:24 AM - edited 06-22-2020 08:25 AM
Hi sorin,
@sorin1 wrote:
yes, but I need to get current date/time from PC (UTC, not local) and then converts it into seconds
Get current time from PC and subtract offset to UTC.
You get the offset by comparing the result of the timestamp to time cluster conversion with/without UTC flag or by using the %z formatcode when converting a timestamp to a string…
06-22-2020 08:29 AM
@sorin1 wrote:
yes, but I need to get current date/time from PC (UTC, not local) and then converts it into seconds
Then just use the Get Date/Time In Seconds and convert to a DBL. The timestamp's data is in UTC. The display will, by default, match the system format.
06-22-2020 08:32 AM
Please GerdW, could you post an example? thanks
06-22-2020 08:47 AM - edited 06-22-2020 08:48 AM
@sorin1 wrote:
Please GerdW, could you post an example? thanks
Here's what I was saying. The timestamp control shows the system time zone, but the data is still UTC.
07-08-2020 08:54 AM
07-08-2020 04:31 PM
Keeping your log files with UTC timestamp erases any DST ambiguities and other weirdness, like: what happens in the fall when you have two sets of data between 0100 and 0200, and in the spring when you will have a hole between 0200 and 0300?
07-08-2020 06:42 PM
@billko wrote:
Keeping your log files with UTC timestamp erases any DST ambiguities and other weirdness, like: what happens in the fall when you have two sets of data between 0100 and 0200, and in the spring when you will have a hole between 0200 and 0300?
The last system I did, I just kept the system on UTC (set time zone to UTC). Much easier to manage then. It also helped to synchronize with my UUT since it kept a UTC time. I got really good at subtracting 4 or 5 hours in my head to convert to EDT or EST.