Version: v0.7.1 - Beta.  We welcome contributors & feedback.

Date.setTimezone

$date.setTimezone($timezoneName) -> false

Description

Set the timezone of the Date object.

See the List of Supported Timezones.

By default, dates are created with the timezone set in app.jcon (default is UTC).

$date = Date.now()
//= <Date 2021-05-07 16:42:16 +0000>

$date.setTimezone('Europe/Helsinki')
//= <Date 2021-05-07 19:41:16 +0300>

See Also