sample_time_shift - bruno-beloff/scs_analysis GitHub Wiki
docs > software repositories > scs_analysis > commands > time
DESCRIPTION
The sample_time_shift utility is used to add a unit of time to the reported datetime of each record in the input data set. This is useful when reference data is labelled for the beginning of the time period instead of the end (the latter is the form used by South Coast Science).
The path to the ISO 8601 recording datetime may be given, otherwise it defaults to 'rec'.
SYNOPSIS
sample_time_shift.py -t { + | - } [[DD-]HH:]MM[:SS] [-v] [PATH]
Options | |
---|---|
--version | show program's version number and exit |
-h, --help | show this help message and exit |
-t TIMEDELTA, --timedelta=TIMEDELTA | sign and offset in days / hours / minutes / seconds |
-v, --verbose | report narrative to stderr |
EXAMPLES
csv_reader.py -v mfidikwe.csv | sample_time_shift.py -v -t + 00:01:00 | csv_writer.py -v mfidikwe_shifted.csv
DOCUMENT EXAMPLE - INPUT
{"rec": "2021-10-31T22:00:00Z", "meteo": {"T": 15.2, "rH": 62}, "gas": {"SO2": 11}}
DOCUMENT EXAMPLE - INPUT
{"rec": "2021-10-31T22:01:00Z", "meteo": {"T": 15.2, "rH": 62}, "gas": {"SO2": 11}}