Computer - Set Date/Time

Declaration

<AMSETSYSTEMTIME SERVER="text (server name)" />

Description: Sets the system clock to the date and time corresponding to a specific internet time server (a dedicated time server that distributes accurate time) or sets the clock to a specific date/time.

Practical Usage

Often used to set the system date and time to an accurate value. Also a practical way to synchronize the date and time in a multi-machine environment.

General Parameters

Property

Type

Required

Default

Markup

Description

Set to internet time server

Text

No

(Empty)

 

If enabled, specifies that the date and time will be set using the Internet time server.

Use a specific time server

Text

No

time.chu.nrc.ca

SERVER="tick.ucla.edu"

If enabled, provides a list of time servers to select from. The available options are:

  • time.chu.nrc.ca

  • time.nrc.ca

  • navobs1.usnogps.navy.mil

  • navobs2.usnogps.navy.mil

  • tick.ucla.edu

  • tock.ucla.edu

  • time-a.nist.gov

  • time-b.nist.gov

Port

Number

No

123

PORT="142"

The Internet port to use. The default port is 123.

Set to specific date and time

Text

No

(Current)

SETTIME="%DateSerial(2010,08,04) + TimeSerial(08,09,30)%"

If enabled, allows you to set a specific date and time.

Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.

Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)

On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)

Example

Sample 1 - Use specific time server to set date and time.

<AMSETSYSTEMTIME SERVER="navobs2.usnogps.navy.mil" />

Sample 2 - Set to a specific date and time.

<AMSETSYSTEMTIME SETTIME="%DateSerial(2010,12,25) + TimeSerial(00,00,00)%" />