Date and Time Configurations

The Automation1 controller lets you get and set its date, time, and time zone.

On PC-based controllers:

  • To get the date and time information, you can use the AeroScript DateTime Functions or Automation1 Console commands.
  • To set the date and time information, you must use the standard Windows menus.

On Drive-based controllers:

  • To get the date and time information, you can use the AeroScript DateTime Functions or Automation1 Console commands.
  • To set the date and time information for the system clock, Aerotech recommends that you use Machine Setup in Automation1 Studio. See the Controller milestone for more information. As an alternative, you can set the date and time of the system clock by using the Automation1 Console commands. Refer to the information that follows to learn more about these commands.

Getting the Controller Date and Time

To get the date and time of a controller, use the datetime get Console command as follows:

datetime get

This command returns a date and time string in the sequence of:

[DayOfWeek] [YYYY-MM-DD] [HH:MM:SS] [TimeZone]

Table: datetime get Console Command Arguments

Argument Description

[DayOfWeek]

The name of the day of the week.

[YYYY-MM-DD]

The current year, month, and day. The values are zero-padded to match this format.

[HH:MM:SS]

The current time with zero-padded values.

[TimeZone]

The name of the time zone that applies to your current location.

IMPORTANT: The names of time zones are different between the PC and Drive-based controllers.

To find the time zones that apply to your controllers:

Setting the Controller Date and Time

To set the date and time for a drive-based controller, Aerotech recommends that you use Machine Setup in Automation1 Studio as an alternative to the Automation1 Console commands. See the Controller milestone on the Machine Setup page for more information.

You can use the datetime set Automation1 Console command to change the date and time on the system clock of your drive-based controller. Refer to the information that follows:

WARNING: Use the datetime set Console command with drive-based controllers only. If you try to use it while you are connected to a PC-based controller, the command will return an error. To set the date and time for a PC-based controller, you must use the standard Windows menus.

To Set the Controller Date and Time to the values that you specify

datetime set dateString timeString [timeZone]

Specify values for the controller date and time arguments that follow:

Table: datetime set Console Command Arguments (Positionals)

Argument Description

dateString

Required text argument. The date to set as a string in the form of YYYY-MM-DD. The year must be a four-digit year. The month is one-based with January as month 1. The day is also one-based.

timeString

Required text argument. The time to set as a string in the form of HH:MM:SS. You must specify the time in 24-hour format.

[timeZone]

Optional text argument. The name of the time zone for the time that you set. If you do not specify a time zone, the time zone on the controller does not change. If you specify an invalid time zone name for this argument, the drive-based controller returns an error. For information about all the valid time zone names for drive-based controllers, see the Time Zones for Drive-Based Controllers section of this page.

Time Zones for Drive-Based Controllers

You can set two types of time zones - ones that adjust for Daylight Savings Time and ones that do not.

IMPORTANT: When you use the datetime set Console command, you must supply the time zone name exactly as it appears in the table.

Table: Time Zones That Adjust for Daylight Savings Time

Africa/Abidjan

America/Port-au-Prince

Asia/Nicosia

Europe/Minsk

Africa/Accra

America/Puerto_Rico

Asia/Omsk

Europe/Monaco

Africa/Algiers

America/Punta_Arenas

Asia/Pyongyang

Europe/Moscow

Africa/Bissau

America/Regina

Asia/Qatar

Europe/Oslo

Africa/Cairo

America/Rio_Branco

Asia/Riyadh

Europe/Paris

Africa/Casablanca

America/Santiago

Asia/Seoul

Europe/Prague

Africa/Johannesburg

America/Santo_Domingo

Asia/Shanghai

Europe/Riga

Africa/Lagos

America/Sao_Paulo

Asia/Singapore

Europe/Rome

Africa/Maputo

America/St_Johns

Asia/Taipei

Europe/Samara

Africa/Monrovia

America/Tegucigalpa

Asia/Tashkent

Europe/Simferopol

Africa/Nairobi

America/Tijuana

Asia/Tbilisi

Europe/Sofia

Africa/Ndjamena

America/Toronto

Asia/Tehran

Europe/Stockholm

Africa/Sao_Tome

America/Vancouver

Asia/Thimphu

Europe/Tallinn

Africa/Tripoli

America/Winnipeg

Asia/Tokyo

Europe/Tirane

Africa/Tunis

America/Yellowknife

Asia/Tomsk

Europe/Vienna

America/Adak

Antarctica/Casey

Asia/Ulaanbaatar

Europe/Vilnius

America/Anchorage

Antarctica/Davis

Asia/Urumqi

Europe/Warsaw

America/Argentina/Buenos_Aires

Antarctica/DumontD’Urville

Asia/Vladivostok

Europe/Zurich

America/Asuncion

Antarctica/Macquarie

Asia/Yakutsk

Indian/Chagos

America/Bahia_Banderas

Antarctica/Mawson

Asia/Yangon

Indian/Christmas

America/Barbados

Antarctica/Palmer

Asia/Yekaterinburg

Indian/Cocos

America/Belize

Antarctica/Rothera

Asia/Yerevan

Indian/Kerguelen

America/Boa_Vista

Antarctica/Syowa

Atlantic/Azores

Indian/Mahe

America/Bogota

Antarctica/Troll

Atlantic/Bermuda

Indian/Maldives

America/Caracas

Antarctica/Vostok

Atlantic/Canary

Indian/Mauritius

America/Cayenne

Asia/Almaty

Atlantic/Cape_Verde

Indian/Reunion

America/Chicago

Asia/Amman

Atlantic/Faroe

Pacific/Apia

America/Chihuahua

Asia/Ashgabat

Atlantic/Reykjavik

Pacific/Auckland

America/Costa_Rica

Asia/Atyrau

Atlantic/South_Georgia

Pacific/Bougainville

America/Curacao

Asia/Baghdad

Atlantic/Stanley

Pacific/Chatham

America/Denver

Asia/Baku

Australia/Adelaide

Pacific/Chuuk

America/Edmonton

Asia/Bangkok

Australia/Brisbane

Pacific/Easter

America/El_Salvador

Asia/Beirut

Australia/Darwin

Pacific/Efate

America/Fort_Nelson

Asia/Bishkek

Australia/Eucla

Pacific/Enderbury

America/Grand_Turk

Asia/Brunei

Australia/Lindeman

Pacific/Fakaofo

America/Guatemala

Asia/Colombo

Australia/Lord_Howe

Pacific/Fiji

America/Guayaquil

Asia/Damascus

Australia/Melbourne

Pacific/Funafuti

America/Guyana

Asia/Dhaka

Australia/Perth

Pacific/Galapagos

America/Halifax

Asia/Dili

Australia/Sydney

Pacific/Gambier

America/Havana

Asia/Dubai

Europe/Amsterdam

Pacific/Guadalcanal

America/Hermosillo

Asia/Dushanbe

Europe/Andorra

Pacific/Guam

America/Jamaica

Asia/Famagusta

Europe/Athens

Pacific/Honolulu

America/La_Paz

Asia/Gaza

Europe/Belgrade

Pacific/Kiritimati

America/Lima

Asia/Ho_Chi_Minh

Europe/Berlin

Pacific/Majuro

America/Los_Angeles

Asia/Hong_Kong

Europe/Brussels

Pacific/Marquesas

America/Managua

Asia/Hovd

Europe/Bucharest

Pacific/Nauru

America/Martinique

Asia/Irkutsk

Europe/Budapest

Pacific/Niue

America/Mazatlan

Asia/Jakarta

Europe/Chisinau

Pacific/Norfolk

America/Mexico_City

Asia/Jayapura

Europe/Copenhagen

Pacific/Noumea

America/Miquelon

Asia/Jerusalem

Europe/Dublin

Pacific/Pago_Pago

America/Monterrey

Asia/Kabul

Europe/Gibraltar

Pacific/Palau

America/Montevideo

Asia/Kamchatka

Europe/Helsinki

Pacific/Pitcairn

America/Nassau

Asia/Karachi

Europe/Istanbul

Pacific/Pohnpei

America/New_York

Asia/Kathmandu

Europe/Kaliningrad

Pacific/Port_Moresby

America/Noronha

Asia/Kolkata

Europe/Kiev

Pacific/Rarotonga

America/Nuuk

Asia/Kuala_Lumpur

Europe/Lisbon

Pacific/Tahiti

America/Panama

Asia/Macau

Europe/London

Pacific/Tarawa

America/Paramaribo

Asia/Magadan

Europe/Luxembourg

Pacific/Tongatapu

America/Phoenix

Asia/Makassar

Europe/Madrid

Pacific/Wake

America/Port_of_Spain

Asia/Manila

Europe/Malta

Pacific/Wallis

Table: Time Zones That Do Not Adjust for Daylight Savings Time

Etc/UTC

Etc/GMT-1

Etc/GMT

Etc/GMT-2

Etc/GMT+1

Etc/GMT-3

Etc/GMT+2

Etc/GMT-4

Etc/GMT+3

Etc/GMT-5

Etc/GMT+4

Etc/GMT-6

Etc/GMT+5

Etc/GMT-7

Etc/GMT+6

Etc/GMT-8

Etc/GMT+7

Etc/GMT-9

Etc/GMT+8

Etc/GMT-10

Etc/GMT+9

Etc/GMT-11

Etc/GMT+10

Etc/GMT-12

Etc/GMT+11

Etc/GMT-13

Etc/GMT+12

Etc/GMT-14