DateTimeConverter

awips.DateTimeConverter.constructTimeRange(*args)[source]

Builds a python dynamicserialize TimeRange object from the given arguments.

Args:
args*: must be a TimeRange or a pair of objects that can be

converted to a datetime via convertToDateTime().

Returns:

A TimeRange.

awips.DateTimeConverter.convertToDateTime(timeArg)[source]

Converts the given object to a python datetime object. Supports native python representations like datetime and struct_time, but also the dynamicserialize types like Date and Timestamp. Raises TypeError if no conversion can be performed.

Args:

timeArg: a python object representing a date and time. Supported types include datetime, struct_time, float, int, long and the dynamicserialize types Date and Timestamp.

Returns:

A datetime that represents the same date/time as the passed in object.