Set Date and Time

Sets the system clock to the date and time referenced by a specific Internet time server (a dedicated time server that distributes accurate time) or sets the system clock to the date and time specified. 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-computer environment.

To set System Time properties

  1. In the Available Actions pane, open the Network folder and double-click the System Time action or drag it into the Steps pane.

  1. Set General properties in one of the following ways:

  2. To set the Description tab properties, refer to Description Tab Options.

  3. To set the Error Causes and On Error tab properties, refer to Step Error Handling.

  4. Click OK to save settings.

Declaration

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

- or-

<AMSETSYSTEMTIME SETTIME="Date/Time" />

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

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

Example 2 - Set to a specific date and time.

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

See Also: Change Printer, Empty Recycle Bin, End Process, Get Process Information, Get Volume Information, Log Event, Print, Registry

General Tab

Property

Type

Required

Default

Markup

Description

Set to Internet time server

Text

No

(Empty)

null

Sets the date and time 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.

See Also

About Actions

Adding Task Steps