Skip to content

getTimezone

getTimezone(datetime) → string · Date & Time

Get the timezone offset string from a datetime value.

  • datetime (required): datetime with timezone
utlx
{
  offset: getTimezone(now())              // "+02:00"
}

Released under AGPL-3.0.