# TimestampFieldInfo¶

class lsst.ts.MTMount.field_info.TimestampFieldInfo

UTC timestamp field.

The str representation is ISO-8601, with “T” between the date and time. For example: “2020-02-27T14:48:27.469”. It will never have leap seconds (see notes).

Parameters: name : str Name of field. Must be a valid Python identifier. doc : str, optional Description of the field. scale : str One of “tai” or “utc”, where “utc” is an approximation without leap seconds (see notes). default : If True then the current date is used as a default. If None then the date must be specified.

Notes

The time is not exactly UTC; it is a an approximation to UTC which has no leap seconds. On the day of a leap second the time time is uniformly stretched so there are the usual number of seconds in the day. Tekniker’s code only uses UTC time for unimportant message timestamps, and this avoids the risk of passing Tekniker’s code a timestamp value that it cannot handle.

Attributes Summary

Methods Summary

 assert_value_ok(value) str_from_value(value) Return a string representation of the value. value_from_str(strval) Convert a string to a value of the correct type.

Attributes Documentation

default

Methods Documentation

assert_value_ok(value)
str_from_value(value)

Return a string representation of the value.

value_from_str(strval)

Convert a string to a value of the correct type.

Parameters: strval : str String representation of value. value : any The parsed value. ValueError If the value cannot be parsed.