timezone

timezone

castFromServer()

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

Arguments

NameTypeRequiredDefaultOptionsDescription
thisDatedateYes
tzstringNo#variables.mytz#

castFromUTC()

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

Arguments

NameTypeRequiredDefaultOptionsDescription
thisDatedateYes
tzstringNo#variables.mytz#

castToServer()

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

Arguments

NameTypeRequiredDefaultOptionsDescription
thisDatedateYes
tzstringNo#variables.mytz#

castToUTC()

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

Arguments

NameTypeRequiredDefaultOptionsDescription
thisDatedateYes
tzstringNo#variables.mytz#

getAvailableTZ()

returns a list of timezones available on this server

Arguments

getDST()

returns DST savings in hours

Arguments

NameTypeRequiredDefaultOptionsDescription
None
NameTypeRequiredDefaultOptionsDescription
tzstringNo#variables.mytz#

getRawOffset()

returns rawoffset in hours

Arguments

NameTypeRequiredDefaultOptionsDescription
tzstringNo#variables.mytz#

getServerId()

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

Arguments

getServerTZ()

returns server TZ (long)

Arguments

NameTypeRequiredDefaultOptionsDescription
None

getServerTZShort()

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

Arguments

NameTypeRequiredDefaultOptionsDescription
None

getTZByOffset()

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

Arguments

NameTypeRequiredDefaultOptionsDescription
None
NameTypeRequiredDefaultOptionsDescription
thisOffsetnumericYes

getTZOffset()

returns offset in hours

Arguments

NameTypeRequiredDefaultOptionsDescription
thisDatedateNo#now()#
tzstringNo#variables.mytz#

init()

Arguments

isDST()

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

Arguments

NameTypeRequiredDefaultOptionsDescription
None
NameTypeRequiredDefaultOptionsDescription
dateToTestdateNo#now()#
tzstringYes#variables.mytz#

isValidTZ()

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

Arguments

NameTypeRequiredDefaultOptionsDescription
tzstringNo#variables.mytz#

usesDST()

determines if a given timezone uses DST

Arguments

NameTypeRequiredDefaultOptionsDescription
tzstringNo#variables.mytz#