DuroDBMS API  1.2
Built-in datetime type and operators

TYPE datetime

TYPE datetime
POSSREP {
    year integer,
    month integer,
    day integer,
    hour integer,
    minute integer,
    second integer
};

OPERATOR now

OPERATOR now() RETURNS datetime;

Returns the current time as a datetime, according to the current timezone.

OPERATOR now_utc

OPERATOR now_utc() RETURNS datetime;

Returns the current time as a UTC datetime.

OPERATOR add_seconds

OPERATOR add_seconds(dt datetime, seconds integer) RETURNS datetime;

Adds the number of seconds specified by seconds to the datetime specified by dt using the current time zone and returns the result.

OPERATOR weekday

OPERATOR weekday(dt datetime) RETURNS integer;

Returns, for the given datetime, the weekday as the number of days since Sunday.

OPERATOR local_to_utc

OPERATOR local_to_utc(dt datetime) RETURNS datetime;

Converts a local datetime to a UTC datetime.