generated from WebAssembly/wasi-proposal-template
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
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
unix_timestamp() -> i64
to get the Unix timestampunix_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
devigned
Metadata
Metadata
Assignees
Labels
No labels