Back to Pocketbase

Class Timezone

static/jsvm/classes/Timezone.html

latest1.4 KB
Original Source

Class Timezone

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)Copy

Hierarchy

Implements

Index

Constructors

constructor

Methods

string

Constructors

constructor

Parameters

Optional name: string

Returns Timezone

Methods

string

  • string(): string

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

Returns string

Settings

Member Visibility

  • Inherited

Theme

OSLightDark

On This Page

Generated using TypeDoc