piBrowserTimezoneOffset - cWebApp

Use this property to query the timezone offset in minutes as it is reported by the browser

Type: Property (Web Property)

Access: Read/Write

Data Type: Integer

Parameters: None

 { WebProperty=Client }
 Property Integer piBrowserTimezoneOffset

Web Property Read Access: WebGet piBrowserTimezoneOffset to IntegerVariable
Web Property Write Access: WebSet piBrowserTimezoneOffset to IntegerVariable/Value

Read Access: Get piBrowserTimezoneOffset to IntegerVariable
Write Access: Set piBrowserTimezoneOffset to IntegerVariable/Value


Use this property to query the timezone offset in minutes as it is reported by the browser.

So for UTC+3 without daytime saving this property would return -180.

Object oShowTimezoneOffsetBtn is a cWebButton
    Set piColumnSpan to 2
    Set psCaption to "Show timezone"

    Procedure OnClick
        Integer iOffset
        WebGet piBrowserTimezoneOffset of ghoWebApp to iOffset
        Send ShowInfoBox (SFormat("The offset in minutes between UTC and the time zone, as indicated by the browser, is: %1", iOffset))

About Web Properties
Each web property maintains two values: The regular property value is set during object creation and should not be changed during the lifetime of that object. To access that value, use the standard property Get and Set syntax.
The web property value is the local value stored at each client. This is synchronized to the client's local value whenever a server call is being processed. To access the web property value, use the WebGet and WebSet syntax above instead of the standard Get and Set syntax.