Skip to content

More explicit date-and-time resource #7

@Mossaka

Description

@Mossaka

Currently timestamp is defined as a u64 type, which doesn't really specify what kind of date and time representation it is. It might be seconds since Unix Epoch or it might noe be. I would suggest to come up with a more explictly date and time resource which provides methods to convert timestamp to different representations. Minimally, it should contain two methods

  1. unix_timestamp() -> i64 to get the Unix timestamp
  2. unix_timestamp_nanos() -> i128 to get the Unix timestamp in nanoseconds

In addition, we might want to consider adding from functions to convert unix timestamp this sturct as constructors.

We may want to define other functions such as date and time to return date and time representations resp.

CC @devigned

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions