pyds.Time

class pyds.Time(hour, minute, second=None, utc=False, zone_hour=None, zone_minute=None)

Bases: pyds.Scalar

Represents a PDS time value.

Parameters
  • hour (int)

  • minute (int)

  • second (None or float)

  • utc (True or False)

    Whether the time is in UTC or not.

  • zone_hour (None or int)

    If utc is True and zone_hour is not None, zone_hour is stored, but when Time is serialized, it’s serialized ignoring zone_hour.

  • zone_minute (None or int)

Raises
  • ValueError
    • If hour is not between 0 and 23.
    • If minute is not between 0 and 59.
    • If second is not None and not between 0 and 59.
    • If zone_hour is not None and not between -12 and 12.
    • If zone_hour is not None and zone_minute is not between 0 and 59.
Attributes
hour

int. Read-only.

minute

int. Read-only.

second

float. Read-only.

utc

Whether Time is in UTC. True or False. Read-only.

zone_hour

None or int. Read-only.

zone_minute

None or int. Read-only.


Special Methods

Time.__str__()

Return a PDS serialized string (str) representing the object.

Called by str().