Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Data Archive Reference

Offsets for event time stamps (-tfix -tfixend)

  • Last UpdatedOct 02, 2024
  • 1 minute read

Offsets, as a function of time, are defined in the time conversion file. Use offsets to apply corrections to times on systems with incorrect time stamps.

To add a given time offset to every event:

-tfix conversion_file

The optional -tfixend parameter allows you to specify a time stamp after which no time stamp corrections are performed. For example, the following combination of -tfix and -tfixend specifies to perform the time stamp corrections specified in the file conversion_file.txt and to not modify any event time stamps at or after 13:00:00 January 1, 2010:

-tfix conversion_file.txt -tfixend "1-jan-2010 13:00:00"

Time conversion file format

Note the following about the time conversion file format:

  • Lines starting with # are comments.

  • Empty lines and white spaces are ignored.

  • Data lines have the format:

    StartTime, offset

    StartTime can be expressed as UTC - seconds since 1/1/70 or as PI local time-stamp string. UTC time stamps and strings cannot be intermingled, the first format is assumed for all entries.

    Offset is a number of seconds added to the time stamp of every event within the time range. Fractional seconds are not supported. Offset applies from time stamp up to, but not including, the next time stamp.

Time conversion file examples

Move entire archive ahead by 1 hour:

0,3600
2000000000,3600

Move entire archive ahead by 1 hour (another format):

01-Jan-70 00:00:00,3600
01-Jan-30 00:00:00,3600

Apply a missed DST conversion to an archive that covers the summer of 2016:

01-Jan-16 00:00:00,0
13-Mar-16 02:00:00,3600
06-Nov-16 02:00:00,0
31-Dec-16 23:59:59,0

Apply the time adjustments for each time period as a series of UTC values and offsets:

814953600,-61200
828871200,-57600
846403200,-61200
860320800,-57600

TitleResults for “How to create a CRG?”Also Available in