Overview
The SystemTime Module is used to set the device clock and timezone, or to set the device to obtain clock and timezone settings from a network server.
Syntax
systemTime (Module) <META> Syntax |
---|
<META HTTP-Equiv="SystemTime" content="[parameter]"> |
SystemTime JavaScript Object Syntax: |
---|
By default the JavaScript Object 'systemTime' will exist on the current page and can be used to interact directly with the systemTime. |
To Set systemTime parameters via JavaScript use the following syntax: systemtime.parameter = 'value'; remembering to enclose your value in quotes where appropriate.
e.g. systemTime.setLocal = 'value'; |
To set multiple EMML parameters / events on a single line use the following syntax: systemtime.setEMML("[Your EMML Tags]");
e.g. systemTime.setEMML("setLocal:value"); |
Parameters
Items listed in this section indicate parameters, or attributes which can be set.
Name | Possible Values | Description | Default Value |
---|---|---|---|
setLocal:[Value] | Local Time String i.e. "2011-12-25T09-57-00+01-00" or "2011-12-25T09-57-00" | Local Time String in the format <YYYY>-<MM>-<DD>T<HH>-<MM>-<SS><+/-><HH offset from UTC>-<MM offset from UTC>. The offset from UTC is optional | N/A |
setUtc:[Value] | UTC Time String i.e. "2011-12-25T09-57-00+01-00" or "2011-12-25T09-57-00" | UTC Time String in the format <YYYY>-<MM>-<DD>T<HH>-<MM>-<SS><+/-><HH offset from UTC>-<MM offset from UTC>. The offset from UTC is optional | N/A |
SntpServerIP:[Value] | Valid IP Address | The IP address of the SNTP time server | N/A |
Remarks
Latency
Once the SntpServerIP tag is parsed RhoElements will request the time from the SNTP server immediately, however the clock will not be updated until a response is received. Network latency and connectivity issues can all affect the speed and success with which this tag is actioned.
Proxy Settings
Windows Mobile 5.0 or above will not allow you to obtain SNTP time when requesting via a proxy server, it is recommended the proxy is bypassed for this to work.
Time Zone
The Time Zone location string (Windows CE) is not supported. The timezone offset from GMT will be correctly set, but the geographical location will not be set.
Requirements
RhoElements Version | 2.1 or above |
---|---|
Supported Devices | All supported devices except: Enterprise Tablet. |
Minimum Requirements | None. |
Persistence | Persistent - Changes to this module will persist when navigating to a new page. |
HTML/JavaScript Examples
The following example sets the device time to 9:57am on 25th December 2011 Local Time without changing the timezone:
<META HTTP-Equiv="SystemTime" Content="setLocal:2011-12-25T09-57-00">
The following example sets the device time to 9:57am on 25th December 2011 UTC, and the timezone to UTC+1. Local Time on the device will therefore be 1 hour ahead of the UTC time given, so the local time displayed will be 10:57am:
<META HTTP-Equiv="SystemTime" Content="setUtc:2011-12-25T09-57-00+01-00">
The following example sets the UTC device time from a network time server:
<META HTTP-Equiv="SystemTime" Content="SntpServerIP:132.163.4.102">