GetClock

This function gets how many seconds have elapsed since 12:00 AM GMT on January 1, 1970, according to the system clock.

Function Group Execution Windows Embedded Thin Client Mobile Access
GetClock Date & Time Synchronous Supported Supported Supported Supported (see “Notes” below)

Syntax

  GetClock( optTimeZone )  
Web Studio Help  function datetime getclock.xml d91455e82 GetClock

optTimeZone
A time zone name (string) or index (integer).
Value Description
-i A time zone index (i), up to the maximum index returned by the function GetTimeZoneCount.

On Windows Embedded Compact, the only valid index is -1 (i.e., the current time zone).

0 The current time zone in either the project runtime or the Viewer module / thin client, depending on where the function is called from.

This may be different from the current time zone in the local computer’s system settings, if the function SetTimeZone was executed previously.

1 Coordinated Universal Time (UTC).
2 The current time zone in the local computer’s system settings.

On Windows Embedded Compact, this value is invalid.

"timezone" The full name of a time zone (e.g., "Central Standard Time").

On Windows Embedded Compact, this value is invalid.

This parameter is optional; if you do not specify a tag or value, then the default value is 0.

Returned value

This function returns the number of seconds that have elapsed since 12:00 AM GMT on January 1, 1970, according to the system clock. If a time zone is specified, the number of seconds is adjusted to reflect the change from the current time zone to the specified time zone.

Notes

If this function is called on Mobile Access, it is executed using the system time on the project runtime server.

GetClock