timezone

timezone

timezone

various timezone functions not included in mx: version 2.1 jul-2005 Paul Hastings ([email protected])

Metadata

castFromServer()

returns date in given TZ from given server date, takes DST into account

Arguments

Name Type Required Default Options Description
thisDate date Yes
tz String No [runtime expression]

castFromUTC()

returns date in given TZ from given UTC date, takes DST into account

Arguments

Name Type Required Default Options Description
thisDate date Yes
tz String No [runtime expression]

castToServer()

returns server date in given TZ from given UTC date, takes DST into account

Arguments

Name Type Required Default Options Description
thisDate date Yes
tz String No [runtime expression]

castToUTC()

returns UTC from given date in given TZ, takes DST into account

Arguments

Name Type Required Default Options Description
thisDate date Yes
tz String No [runtime expression]

getAvailableTZ()

returns a list of timezones available on this server

Arguments

Name Type Required Default Options Description
None

getDST()

returns DST savings in hours

Arguments

Name Type Required Default Options Description
tz String No [runtime expression]

getRawOffset()

returns rawoffset in hours

Arguments

Name Type Required Default Options Description
tz String No [runtime expression]

getServerId()

returns the server timezone id. contributed by dan switzer: [email protected]

Arguments

Name Type Required Default Options Description
None

getServerTZ()

returns server TZ (long)

Arguments

Name Type Required Default Options Description
None

getServerTZShort()

returns server TZ (short). contributed by dan switzer: [email protected]

Arguments

Name Type Required Default Options Description
None

getTZByOffset()

returns a list of timezones available on this server for a given raw offset

Arguments

Name Type Required Default Options Description
thisOffset numeric Yes

getTZOffset()

returns offset in hours

Arguments

Name Type Required Default Options Description
thisDate date No [runtime expression]
tz String No [runtime expression]

init()

Arguments

Name Type Required Default Options Description
None

isDST()

determines if a given date in a given timezone is in DST

Arguments

Name Type Required Default Options Description
dateToTest date No [runtime expression]
tz String Yes [runtime expression]

isValidTZ()

validates if a given timezone is in list of timezones available on this server

Arguments

Name Type Required Default Options Description
tz String No [runtime expression]

usesDST()

determines if a given timezone uses DST

Arguments

Name Type Required Default Options Description
tz String No [runtime expression]