Timestamp

Timestamp is the stacking time as the absolute number of seconds from the epoch. This kind of counting method does not change no matter where you are located on the globe. Therefore, All time-information stored in TimeSeires and TimeSeriesArray objects are dealt with as the timestamp.

MCGpy timestamp is a way to follow time since the start of the epoch at midnight on January 1st, 1970, which is the standard Unix timestamp. And, the additional timestamp option is provided, in which LabVIEW records the seconds from midnight on January 1st, 1904.

For example,

Type Datetime Timestamp
Python(Unix) 2022-02-22 02:02:02 1645462922.0
Labview 2022-02-22 02:02:02 3728338194.0

The time

from mcgpy.time import (tconvert, to_datetime, to_timestamp)

The time module consists of three converting methods:

Functions Description
tconvert Convert the timestamp (Unix or LabVIEW type) to the datetime string, vice versa
to_timestamp Convert the datetime string to the timestamp (Unix or LabVIEW type)
to_datetime Convert the the timestamp (Unix or LabVIEW type) to the datetime string