UTCOFFSET
Syntax
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> UTCOFFSET[UTCOFFSET]:::quoted
UTCOFFSET --> End((END))
Purpose
The UTCOFFSET SQL function gets the number of seconds the local time zone of the device where Invantive UniversalSQL runs is ahead of UTC. The number is negative when the local time zone is behind UTC. The function can be used without parentheses. The offset is the one at the moment of the SQL statement, which is the same moment for every occurrence within the statement, as described in NOW.
Returns: the offset of the local time zone relative to UTC in seconds as decimal.
Examples
The following example retrieves the offset of the local time zone relative to UTC in seconds; the actual value depends on the local time zone, such as 7200 for Central European Summer Time (UTC+2):
select utcoffset
-------------------
7200
The following example retrieves the offset of the local time zone relative to UTC expressed in hours; the actual value depends on the local time zone, such as 2 for Central European Summer Time (UTC+2):
select utcoffset / 3600
-------------------
2