LOCALTIMESTAMP

Returns the current TIMESTAMP as defined by the computer on s-Server is running.

LOCALTIMESTAMP is always returned using the timezone in which s-Server is running. This is explicitly set to UTC, rather than the default timezone for the server.

SQLstream recommends that as far as possible all times used should be treated as UTC - this avoids problems with handling summer time and especially the repeating hour (in local times - for example 01:00 to 02:00) when clocks go back in fall (autumn).

Like all the standard SQL date/time functions, this function returns the same value - the timestamp when the query started (actually, when the first row is processed) - for every row processed. A streaming query may run for minutes, hours, days or even years; if you want to return the latest time when each row is processed you should instead use CURRENT_ROW_TIMESTAMP.

See also:

Example

0: jdbc:sqlstream:> values localtimestamp;
+---------------------+
|   LOCALTIMESTAMP    |
+---------------------+
| 2020-12-12 14:56:30.575 |
+---------------------+

Limitations

SQLstream does not support the optional parameter specified in the SQL standard. This is a departure from the SQL standard.