zone

Return zone information as a string about the datetime (or timeval) object. If no zone information is available, nil will be returned.

This function does not generate an event.

Function

datetime.zone()

Arguments

None

Return value

Returns zone information or nil if no zone information is available.

Example

This code uses zone() as an example:

[
    datetime().zone(),
    datetime().to('Europe/Amsterdam').zone(),
    datetime().to('+00').zone(),
]

Return value in JSON format

[
    "UTC",
    "Europe/Amsterdam",
    null
]