Timezone returns the timezone location with the given name.

The name is expected to be a location name corresponding to a file in the IANA Time Zone database, such as "America/New_York".

If the name is "Local", LoadLocation returns Local.

If the name is "", invalid or "UTC", returns UTC.

The constructor is equivalent to calling the Go time.LoadLocation(name) method.

Example:

const zone = new Timezone("America/New_York")
$app.cron().setTimezone(zone)

Hierarchy

Implements

Constructors

Methods

Constructors

Methods

  • String returns a descriptive name for the time zone information, corresponding to the name argument to [LoadLocation] or [FixedZone].

    Returns string

Generated using TypeDoc