ph_gettimezoneinfo PowerHome formula function
Description
Returns information concerning
the timezone currently configured on the
PowerHome computer
Syntax
ph_gettimezoneinfo ( ai_type )
Argument | Description |
ai_type | Integer. The type of information to be
returned. Valid values are 0 thru 7. See Usage below |
Return value
String. Returns the specified timezone
information based upon
the ai_type parameter
Usage
Use this function to return timezone
information concerning the PowerHome computer.
Valid values for the ai_type parameter:
0 - Returns the Timezone ID. A 0 return indicates the Timezone ID is Unknown. 1 indicates standard time. 2 indicates daylight savings time.
1 - Returns the text equivalent for standard time.
2 - Returns the text equivalent for daylight savings time.
3 - Returns the base offset from UTC in minutes.
4 - Returns the standard time offset bias
5 - Returns the daylight savings time offset bias
6 - Returns the date that standard time starts for the current year
7 - Returns the date that daylight savings starts for
the current year
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_gettimezoneinfo(3) - Returns the base offset from UTC in minutes. Assuming a timezone of EST, this value will be "300"
• 0 - integer(ph_gettimezoneinfo(3)) +
integer(ph_gettimezoneinfo(if(integer(ph_gettimezoneinfo(0)) < 2,4,5))) -
Returns the actual offset (as an integer) in
minutes of the current timezone. This takes into account whether its currently standard time or daylight savings time. In the case of EST on May 7th, 2020, the return value will be -240