assume_timezone
A wall-clock time read in option zone (IANA), as an instant; options ambiguous (earlier, later, error) and nonexistent (shift_forward, shift_backward, error), both error by default.
Flags
| Flag | Value |
|---|---|
| Kind | scalar |
| Nulls | a null argument gives null |
| Deterministic | yes |
| Order matters | no |
| Decomposable | no |
Example
A pipeline from the language's tested corpus that uses assume_timezone, over the example tables.
from orders
derive {oslo = to_local(placed, zone: "Europe/Oslo"), back = assume_timezone(to_local(placed, zone: "Europe/Oslo"), zone: "Europe/Oslo", ambiguous: "earlier", nonexistent: "shift_forward")}In a plan:
{
"args": [
{
"args": [
{
"col": 6
}
],
"fn": "to_local",
"options": {
"zone": "Europe/Oslo"
}
}
],
"fn": "assume_timezone",
"options": {
"ambiguous": "earlier",
"nonexistent": "shift_forward",
"zone": "Europe/Oslo"
}
}