Time and Date functions

Fauna has two special data types dealing with dates and times. The first data type is date which stores a calendar date. The second is a timestamp (ts) which stores an instant in time expressed as a calendar date and time of day. Timestamp can safely store nanoseconds precision, but be careful as many operating system clocks provide only microsecond precision. All Timestamps are stored in UTC. If a timestamp is inserted with a timezone (TZ), it is converted to UTC and the local timezone is not stored. The following functions allow the manipulation of dates and timestamps.

Date

Converts an ISO-8601 string into a Date.

Epoch

Creates a timestamp from the number of seconds since 1970-01-01.

Time

Converts and ISO-8601 string into a timestamp.