Document revision date: 30 March 2001
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS System Manager's Manual


Previous Contents Index

6.4 Setting Time in an OpenVMS Cluster Environment

The local time, the TDF, and the time zone must be the same on all nodes in an OpenVMS Cluster environment. You can use the System Management utility (SYSMAN) DO command to invoke the command procedure SYS$MANAGER:UTC$TIME_SETUP.COM on one node in a cluster to perform the following actions for one or more nodes in the cluster:

Because SYS$MANAGER:UTC$TIME_SETUP.COM is different on OpenVMS Alpha systems and OpenVMS VAX systems, you must take care in a mixed architecture cluster. Set the SYSMAN environment to operate on all Alpha or all VAX nodes with the following SYSMAM command:


SYSMAN>  SET ENVIRONMENT /NODE=(<node_list>)

Then, after you have run UTC$TIME_SETUP.COM for one architecture, reset the environment to the other architecture and run UTC$TIME_SETUP.COM for that architecture.

6.5 Adjusting for Daylight Saving Time

In time zones that use daylight saving time, your system time must be adjusted twice a year. How this change occurs depends on the following:

Note

If you are using the Distributed Time Synchronization Service (DTSS), DTSS makes the necessary changes between daylight saving time and standard time. See Section 6.1.1.

If DTSS is not in use, use the following table to determine how to change system time between standard time and daylight saving time:
OpenVMS Version Architecture AUTO_DLIGHT_SAV See
7.3 Alpha 1 Section 6.5.1
7.3 Alpha 0 Section 6.5.2
7.3 VAX n/a Section 6.5.2
7.2 and earlier VAX or Alpha n/a Section 6.5.3

6.5.1 Automatically Adjusting for Daylight Saving Time (OpenVMS Alpha Version 7.3 Only)

OpenVMS Alpha Version 7.3 and later contain a system parameter, AUTO_DLIGHT_SAV, that controls automatic switching between standard time and daylight saving time.

If AUTO_DLIGHT_SAV is set to 1, an OpenVMS Alpha Version 7.3 (and later) system automatically sets the time forward or back when local time changes between daylight saving time and standard time.

If AUTO_DLIGHT_SAV is set to 0 (the default), OpenVMS does not automatically change between daylight saving time and standard time.

The AUTO_DLIGHT_SAV parameter and the automatic changes between daylight saving time and standard time are implemented only on OpenVMS Alpha Version 7.3 and later.

For this to work correctly, you must set a time zone rule for your time zone. See Section 6.2 for information about setting time zone rules on OpenVMS Alpha Version 7.3 systems.

To enable or disable the automatic changing from standard time to daylight saving time, you must modify AUTO_DLIGHT_SAV. See Chapter 15 for information about modifying system parameters.

Note

Automatic changes between daylight saving time and standard time work only on OpenVMS Alpha Version 7.3. Compaq recommends that you do not enable automatic daylight saving time conversion on mixed-version or mixed-architecture OpenVMS Clusters.

For details on manually adjusting for daylight saving time on OpenVMS Version 7.3 systems, see Section 6.5.2.

6.5.2 Manually Adjusting for Daylight Saving Time on OpenVMS Version 7.3

This section contains instructions for adjusting system time between standard time and daylight saving time on OpenVMS Version 7.3 when DTSS is not in use. Use these instruction for OpenVMS VAX Version 7.3 and for OpenVMS Alpha Version 7.3 when automatic daylight saving time switching is disabled (system parameter AUTO_DLIGHT_SAV is set to 0).

To adjust the local time to daylight saving time or standard time, invoke command procedure SYS$EXAMPLES:DAYLIGHT_SAVINGS.COM to perform both of the following tasks:

DAYLIGHT_SAVINGS.COM allows you to perform either of the following actions:

DAYLIGHT_SAVINGS.COM creates a command procedure, DST$CHANGE.COM, in the current directory. DST$CHANGE.COM can execute on the current node only. To change the time for all nodes in an OpenVMS Cluster, DAYLIGHT_SAVINGS.COM also creates command procedure DST$SYSMAN.COM that executes DST$CHANGE.COM by executing a SYSMAN DO command. Note that to change all nodes, you must run DAYLIGHT_SAVINGS.COM on a node that has OpenVMS Alpha Version 7.3 installed.

You can run DAYLIGHT_SAVINGS.COM interactively and respond to prompts for input, or run the command procedure with parameters.

To run DAYLIGHT_SAVINGS.COM with parameters, enter the following command:


$ @SYS$EXAMPLES:DAYLIGHT_SAVINGS P1 P2 P3 P4 

The parameters are described in the following table:
P1 DAYLIGHT Change from standard time to daylight saving time
  STANDARD Change from daylight saving time to standard time
P2 NODE Change time on this node only
  CLUSTER Change time on the entire OpenVMS Cluster
P3 EXECUTE Change time immediately
  QUEUE Submit the job to SYS$BATCH for execution at the date and time specified by P4
  SAVE Save the procedure for later modification
P4 date-time If P3 is QUEUE, date and time that the submitted batch job is to run, in DD-MMM-YYYY:HH:MM:SS format; otherwise P4 is unused

Note that you need enter only the first letter of parameters P1, P2, and P3.

To run DAYLIGHT_SAVINGS.COM interactively, enter the following command:


$ @SYS$EXAMPLES:DAYLIGHT_SAVINGS 

DAYLIGHT_SAVINGS.COM prompts you for the parameters specified above.

When executing DAYLIGHT_SAVINGS.COM to change the time on all nodes in an OpenVMS Cluster at a future time, you can specify SAVE for parameter P3. This causes DAYLIGHT_SAVINGS.COM to save command procedures DST$SYSMAN.COM and DST$CHANGE.COM. You can then submit DST$SYSMAN.COM to the correct queue.

6.5.3 Adjusting for Daylight Saving Time on OpenVMS Version 7.2

This section contains instructions for adjusting system time for daylight saving time on OpenVMS Version 7.2 and earlier.

Note

If you are using the Distributed Time Synchronization Service (DTSS), DTSS makes the necessary changes between daylight saving time and standard time. See Section 6.1.1.

To adjust the local time to daylight saving time or standard time, you can invoke the command procedure SYS$EXAMPLES:DAYLIGHT_SAVINGS.COM to perform both of the following tasks:

DAYLIGHT_SAVINGS.COM allows you to perform either of the following actions:

The following example of DAYLIGHT_SAVINGS.COM shows answers that cause the procedure to queue a batch job, DST_CHANGE, which will execute when the time changes from standard time to daylight saving time. Many of the questions are similar to those explained in Section 6.3.2.

In the example, the initial TDF value is -5:00. The local date and time are any time from the date in 2000 when the change to standard time was made, until 1-APR-2001:02:00, when the change to daylight saving time will be made.


 
$ SYS$EXAMPLES:DAYLIGHT_SAVINGS 
 
        This procedure queues a batch job that changes the system time 
        and system time differential around a daylight saving time 
        change.  Press the question mark (?) key at any time for help; 
        hit Control-C to exit. 
 
        The Time Differential Factor (TDF) is the difference 
        between your system time and Coordinated Universal Time (UTC). 
        The difference is expressed in hh:mm format.  The Americas 
        have negative offsets from UTC, while Europe, Africa, Asia 
        and Australia have positive offsets from UTC. 
 
       * Enter the Time Differential Factor: -4:00 [Return]
 
        If this is a seasonal time change, it may also be 
        necessary to modify the system time.  Generally, 
        seasonal time changes result in adding 1:00 hour, 
        or adding -1:00 hour to the local time. 
 
        * Do you wish to modify the local system time [N]: Y [Return]
 
        Enter the time value you would like  to add to 
        the local time.  The value can be a positive or 
        a negative (-hh:mm) value. 
 
        * Enter the time value: +1:00 [Return]
 
        The process to modify your time zone offset and local 
        time (if supplied) can occur now or in the future. 
        Press Return to run the job now. 
 
        * Enter the run time in the DD-MMM-YYYY:HH:MM:SS format: 
01-apr-2001:02:00 [Return]
 
NEW SYSTEM TIME DIFFERENTIAL FACTOR = -4:00. 
ADDING 1:00 TO THE LOCAL TIME. 
JOB RUN TIME : 1-APR-2001:02:00 
 
 
        * Continue? [Y]: Y [Return]
 
Job DST_CHANGE (queue SYS$BATCH, entry 2) holding until 1-APR-2001 02:00 
Batch Job DST_CHANGE scheduled to run at 1-APR-2001:02:00 
$ 
$!!The batch job DST_CHANGE will run on 1-Apr-2001 at 02:00 

6.6 Setting Time Using the Battery-Backed Watch (BBW) (Alpha Only)

The OpenVMS Alpha architecture maintains the current date and time in the Battery-Backed Watch (BBW) across power failures and system downtime. The BBW is functionally equivalent to the Time of Day Register (TODR) that the VAX architecture uses. One difference, however, is the BBW's constraint on the date range.

The BBW provides sufficient storage capability for only a century. The OpenVMS Alpha system date range has been redefined as 1957 to 2056 to maintain correct leap-year processing and to provide for the millennial transition.

In addition, the OpenVMS Alpha timing mechanisms have been changed to allow 2-digit year support in the $ASCTIM system service and the DCL command SET TIME. (Prior to this change, only 4-digit year fields were allowed.) With 2-digit support, you need to enter only the last 2 digits of a year. The century associated with the year field is derived from the placement of the 2 digits in the 1957-2056 date range. For example:


$ SET TIME = 1-NOV-98

In this example, 98 is the equivalent of 1998.


$ SET TIME = 1-NOV-05

In this example, 05 is the equivalent of 2005.

6.7 Choosing Languages, and Date and Time Formats

You can specify languages other than English. From the list that the system manager defines, users can later select a language that they want to display.

You can also select the time and date formats for many SHOW commands from a predefined list or define new time and date formats.

Note

The SHOW TIME command does not include this feature because the SHOW TIME command is processed completely by DCL, which does not have access to the LIB$ routines necessary to format the output.

In addition, the SHOW commands for batch and print operations were modified to include, in the default time-stamp, seconds as well as hours and minutes. These new features were not previously documented.

For example, rather than 15-JAN-2001 10:16:25.14, you can use a different format, such as the following one:


$ SHOW USERS 
 
      OpenVMS User Processes at JANUARY 15, 2001 10:16 AM 
    Total number of users = 7,  number of processes = 11 
 
 Username     Node     Interactive  Subprocess   Batch 
 MCDERMOT    ARD26B            1 
 PASTERNAK   ARD26B            -         2         1 
   .
   .
   .

Later, users can override the system defaults set up by the system manager and select their own date and time formats.

Steps to Change Languages, and Dates and Times

For languages other than English or date/time formats other than the defaults, you must complete these steps.

Note

Compaq recommends that you include these steps within the command procedure SYS$MANAGER:SYSTARTUP_VMS.COM.
  1. Define the logical name SYS$LANGUAGES (plural) to specify the list of languages the users on your system might want to use. (If the language is English, skip this step.)
  2. Invoke the command procedure SYS$MANAGER:LIB$DT_STARTUP.COM, which:
  3. Define date and time formats for the system using either:

6.7.1 Specifying Languages Other Than English

Note

Help/Message language variants might become available in a future release of OpenVMS or on a per-country basis.

You use the SYS$LANGUAGES (plural) logical to define a list of languages other than English. (From this list, users can later select a language to be displayed on their processes, as explained in Section 6.7.4.)

Because English is the default language and must therefore always be available, English spellings are not taken from logical name translations; rather, they are looked up in an internal table.

For example, to specify the French, German, and Italian languages, you must define SYS$LANGUAGES:


$ DEFINE SYS$LANGUAGES FRENCH, GERMAN, ITALIAN

To add another language, for example, FINNISH, you must add FINNISH to the definition of SYS$LANGUAGES and execute the command procedure again.

6.7.2 Invoking LIB$DT_STARTUP.COM

The SYS$MANAGER:LIB$DT_STARTUP.COM command procedure defines the possible choices for the following logicals:

To invoke the command procedure, enter the following command:


$ @SYS$MANAGER:LIB$DT_STARTUP 

If the translation of SYS$LANGUAGES fails, then English is used. If the translation of LIB$DT_FORMAT or any logical name relating to format fails, the OpenVMS standard ($ASCTIM) representation of the date and time is used, that is, dd-mmm-yyyy hh:mm:ss.cc.

6.7.3 Defining System Default Date and Time Formats

To define default date and time formats, you can use either user-defined formats, which are shown in Table 6-2, or predefined formats, which are shown in Table 6-3 and Table 6-4.

To select a format for a date, time, or both, you must define the LIB$DT_FORMAT logical name using the following logicals:

The order in which these logical names appear in the definition of LIB$DT_FORMAT determines the order in which they are output. A single space is inserted into the output string between the two elements if the definition specifies that both are output. For example, to define systemwide formats:


$ DEFINE/SYSTEM LIB$DT_FORMAT LIB$DATE_FORMAT_006, LIB$TIME_FORMAT_012

This definition causes the date to be displayed systemwide in the specified format, followed by a space and the time in the specified format. For example:


13 JAN 97 9:13 AM 

Section 6.7.4 explains how users can select their own date and time formats to be displayed for their process.

6.7.3.1 Defining Your Own Format

To define your own format, define LIB$DATE_FORMAT_nnn and LIB$TIME_FORMAT_nnn, using the mnemonics shown in Table 6-2. Replace nnn with a number of your choice.

Note

For user-defined formats, Compaq recommends that you use values of _500 and above for _nnn.

Table 6-2 Format Mnemonics
Date Explanation
!D0 Day, Zero-Filled
!DD Day, No Fill
!DB Day, Blank-Filled
!WU Weekday, Uppercase
!WAU Weekday, Abbreviated, Uppercase
!WC Weekday, Capitalized
!WAC Weekday, Abbreviated, Capitalized
!WL Weekday, Lowercase
!WAL Weekday, Abbreviated, Lowercase
!MAU Month, Alphabetic, Uppercase
!MAAU Month, Alphabetic, Abbreviated, Uppercase
!MAC Month, Alphabetic, Capitalized
!MAAC Month, Alphabetic, Abbreviated, Capitalized
!MAL Month, Alphabetic, Lowercase
!MAAL Month, Alphabetic, Abbreviated, Lowercase
!MN0 Month, Numeric, Zero-Filled
!MNM Month, Numeric, No Fill
!MNB Month, Numeric, Blank-Filled
!Y4 Year, 4 Digits
!Y3 Year, 3 Digits
!Y2 Year, 2 Digits
!Y1 Year, 1 Digit
Time Explanation
!H04 Hours, Zero-Filled, 24-Hour Clock
!HH4 Hours, No Fill, 24-Hour Clock
!HB4 Hours, Blank-Filled, 24-Hour Clock
!H02 Hours, Zero-Filled, 12-Hour Clock
!HH2 Hours, No Fill, 12-Hour Clock
!HB2 Hours, Blank-Filled, 12-Hour Clock
!M0 Minutes, Zero-Filled
!MM Minutes, No Fill
!MB Minutes, Blank-Filled
!S0 Seconds, Zero-Filled
!SS Seconds, No Fill
!SB Seconds, Blank-Filled
!C7 Fractional Seconds, 7 Digits
!C6 Fractional Seconds, 6 Digits
!C5 Fractional Seconds, 5 Digits
!C4 Fractional Seconds, 4 Digits
!C3 Fractional Seconds, 3 Digits
!C2 Fractional Seconds, 2 Digits
!C1 Fractional Seconds, 1 Digit
!MIU Meridiem Indicator, Uppercase
!MIC Meridiem Indicator, Capitalized (mixed case)
!MIL Meridiem Indicator, Lowercase


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6017PRO_018.HTML