Datetime parsing¶
Overview¶
This page outlines our guidelines for parsing datetime values from raw files to a primary model.
Guidelines¶
Always use the
task_script_utilsdatetime_parser.DatetimeParser.to_tsformat()method to parse raw datetime strings to ISO-8601 stringsThe possible formats should be explicitly defined in the
formatsargument of theDatetimeParserobject, in the form of pendulum tokens.A mapping of timezone abbreviations to UTC offsets can be provided in the
tz_dictargument of theDatetimeParserobject.