VOResource API#

Simple Types#

VOResource Simple Types

class vo_models.voresource.types.UTCTimestamp[source]#

A subclass of datetime to allow expanded handling of ISO formatted datetimes, and enforce the use of a Z identifier for UTC timezone in outputs

classmethod fromisoformat(date_string)[source]#

string -> datetime from a string in most ISO 8601 formats

isoformat(sep='T', timespec='milliseconds')[source]#

Overwrites the datetime isoformat output to use a Z UTC indicator

Parameters:
  • sep (str) – Separator between date and time (default: ‘T’)

  • timespec (str) – Resolution of time to include (default: ‘milliseconds’)

Returns:

VO-compliant ISO-8601 datetime string

Return type:

str