Skip to content

Define how timestamps are exposed in the API #90

@epage

Description

@epage

Timestamps are 64-bit integers.

Sometimes this algorithm applies

def convert_timestamp(timestamp):
    system_epoch = time.gmtime(0)
    system_epock_datetime = datetime.datetime(system_epoch.tm_year, system_epoch.tm_mon, system_epoch.tm_mday)
    xnet_epoch_datetime = datetime.datetime(1601, 1, 1)
    delta = system_epock_datetime - xnet_epoch_datetime
    date = datetime.datetime.fromtimestamp(timestamp * 100e-9) - delta
    return date

and sometimes the timestamp is something else.

We need to define timestamps

  • Easy to use
  • Easy to know definition
  • No loss of information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions