local time and timezone info, into dxd file

  • Software
  • local time and timezone info, into dxd file
antonio berardini

Posted on 26.07.2022 11:57

dear all,


reading dxd files with python and DWDatareader package, as we all know, the start_store_time is an UTC time.

Several packages, based on the dewesoft data reader library, deal with this problem by adding the time zone offset manually, probably assuming that it is known and it an information easily and safely transferrable from who record the data and who analyze the data.


Since we need to compare the dxd file data with data from other sources, we need to know and to be sure about the time zone offset.


Is the time zone offset written into, and readable from, the dxd file?

I guess it is stored in the dxd file, because if I write a dxd file with a PC set to UTC+2 and open the same file with another PC set to UTC+3, the timestamp is correctly read and visualized with UTC+2 as when it was written.


If no, I'm wondering if it is possible to add this feature into the reader library.


thank you

bests!


edit: corrections

Damien Lajarrige

Posted on 02.08.2022 15:42

Hello dear Antonio,


The time written in the .dxd file is the UTC time. The start store time value, read with the DWDataReader library, represents the absolute time in days since the 30th of December, 1899. The time zone information is not written in the .dxd file.


If you open a data file, the displayed time depends on the Absolute time format setting in the User interface.



If UTC time is selected, the time displayed is the UTC time. With Local time option, the time will be displayed according to your PC local time zone setting. Time zone information can be saved with a global variable or in a header and based on the time zone and daylight saving time you can calculate the local time.



Kind regards,

Damien.

Damien Lajarrige

Posted on 03.08.2022 12:14

Dear Antonio,


Some additional information, it's also possible to store the local time and calculate the time shift using Math formulas.



To display the time in "DD/MM/YYYY HH:MM:SS" use the Absolute time option in channel settings.




Kind regards,

Damien.


Attached files:
Login to reply to this topic. If you don't have account yet, you can signup for free account .