| Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
The Create Time Zone Description (CRTTIMZON) command creates a time zone description object that defines the properties of a time zone. The time zone description object is created in the QSYS library. These properties are used to convert time values between Coordinated Universal Time (UTC) form and local forms. These properties are also used to express time values in local forms.
Restrictions:
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| TIMZON | Time zone description | Name | Required, Positional 1 |
| OFFSET | Offset | -779-779 | Required, Positional 2 |
| STDNAME | Standard Time | Single values: *GEN, *MSG Other values: Element list |
Optional |
| Element 1: Abbreviated name | Character value | ||
| Element 2: Full name | Character value | ||
| DSTNAME | Daylight Saving Time (DST) | Single values: *NONE, *GEN, *MSG Other values: Element list |
Optional |
| Element 1: Abbreviated name | Character value | ||
| Element 2: Full name | Character value | ||
| STDMSG | Standard Time message | Name | Optional |
| DSTMSG | Daylight Saving Time message | Name | Optional |
| MSGF | Message file | Qualified object name | Optional |
| Qualifier 1: Message file | Name | ||
| Qualifier 2: Library | Name, *LIBL | ||
| DSTSTR | Daylight Saving Time start | Element list | Optional |
| Element 1: Month | *JAN, *FEB, *MAR, *APR, *MAY, *JUN, *JUL, *AUG, *SEP, *OCT, *NOV, *DEC | ||
| Element 2: Day | *MON, *TUE, *WED, *THU, *FRI, *SAT, *SUN | ||
| Element 3: Relative day of month | *LAST, 1, 2, 3, 4 | ||
| Element 4: Time | Time | ||
| DSTEND | Daylight Saving Time end | Element list | Optional |
| Element 1: Month | *JAN, *FEB, *MAR, *APR, *MAY, *JUN, *JUL, *AUG, *SEP, *OCT, *NOV, *DEC | ||
| Element 2: Day | *MON, *TUE, *WED, *THU, *FRI, *SAT, *SUN | ||
| Element 3: Relative day of month | *LAST, 1, 2, 3, 4 | ||
| Element 4: Time | Time | ||
| DSTSHIFT | Daylight Saving Time shift | 0-120, 60 | Optional |
| TEXT | Text 'description' | Character value, *BLANK | Optional |
| YEAROFS | Year offset | -140-140, 0 | Optional |
| ALTNAME | Alternate name | Character value | Optional |
| AUT | Authority | Name, *USE, *LIBCRTAUT, *CHANGE, *ALL, *EXCLUDE | Optional |
| Top |
Specifies the time zone description to be created. The time zone description is created in QSYS.
This is a required parameter.
| Top |
Specifies the time difference, in minutes, between this time zone and Coordinated Universal Time (UTC). This value is subtracted from local time to obtain UTC time. A negative difference indicates that the time zone is west of UTC and a positive difference indicates that the time zone is east of UTC.
This is a required parameter.
| Top |
Specifies the abbreviated and full names of the time zone when Daylight Saving Time is not being observed.
Single values
Element 1: Abbreviated name
Element 2: Full name
| Top |
Specifies the abbreviated and full names of the time zone when Daylight Saving Time is being observed.
Single values
Element 1: Abbreviated name
Element 2: Full name
| Top |
Specifies the predefined message that contains the abbreviated and full names of the time zone that are used when Daylight Saving Time is not being observed. The first 10 characters of the message contain the abbreviated name and the next 50 characters contain the full name. This parameter must be specified when *MSG is specified for the Standard Time (STDNAME) parameter.
| Top |
Specifies the predefined message that contains the abbreviated and full names of the time zone that are used when Daylight Saving Time is being observed. The first 10 characters of the message contain the abbreviated name and the next 50 characters contain the full name. This parameter must be specified when *MSG is specified for the Daylight Saving Time (DST) (DSTNAME) parameter.
| Top |
Specifies the message file from which the Standard Time message and the Daylight Saving Time message are to be retrieved. The specified message file name and library name are stored in the time zone description. When a message is used to specify the abbreviated and full names, the message is retrieved each time the abbreviated or full names are retrieved. If the message cannot be retrieved from the message file, the names will be returned as *N. This parameter must be specified when *MSG is specified for the Standard Time (STDNAME) parameter or the Daylight Saving Time (DST) (DSTNAME) parameter.
Qualifier 1: Message file
Qualifier 2: Library
| Top |
Specifies when Daylight Saving Time (DST) starts. This parameter contains four elements: the month in which DST starts, the day on which DST starts, the relative day of the month on which DST starts and the time at which DST starts. If this parameter is specified, all four elements must be specified. This parameter must be specified when a value other than *NONE is specified for the Daylight Saving Time (DST) (DSTNAME) parameter. The values specified for this parameter cannot be identical to the values specified for the Daylight Saving Time end (DSTEND) parameter.
Element 1: Month
Element 2: Day
Element 3: Relative day of month
Element 4: Time
| Top |
Specifies when Daylight Saving Time (DST) ends. This parameter contains four elements: the month in which DST ends, the day on which DST ends, the relative day of the month on which DST ends and the time at which DST ends. If this parameter is specified, all four elements must be specified. This parameter must be specified when a value other than *NONE is specified for the Daylight Saving Time (DST) (DSTNAME) parameter. The values specified for this parameter cannot be identical to the values specified for the Daylight Saving Time start (DSTSTR) parameter.
Element 1: Month
Element 2: Day
Element 3: Relative day of month
Element 4: Time
| Top |
Specifies the number of minutes that local time moves forward when Daylight Saving Time starts or moves backward when Daylight Saving Time ends.
| Top |
Specifies the text that briefly describes the object.
| Top |
Specifies the number of years that the current year in the calendar system used with this time zone differs from the current Gregorian year. If your calendar year differs from the current Gregorian year, subtract the current Gregorian year from the current year in your calendar to determine the value for this parameter. For example, if the current Gregorian year is 2006 and the current year in your calendar is 1949, the year offset should be set to -57 (1949 minus 2006).
| Top |
Specifies the alternate name that provides additional information for describing the time zone description.
| Top |
Specifies the authority you are giving to users who do not have specific authority to the object, who are not on an authorization list, and whose group profile has no specific authority to the object.
| Top |
Example 1: Creating a Time Zone Description
CRTTIMZON TIMZON(CENTRAL) OFFSET(-360)
STDNAME(CTZ 'Central Time Zone')
TEXT('Central Time Zone with Standard Time Only')
This command creates the CENTRAL time zone description. The offset for the time zone is negative six hours (-360 minutes). The Standard Time abbreviated name of the time zone is 'CTZ' and the Standard Time full name of the time zone is 'Central Time Zone'. The text description associated with the time zone description object is 'Central Time Zone with Standard Time Only'. This time zone description does not observe Daylight Saving Time.
Example 2: Creating a Time Zone Description that Supports Daylight Saving Time
CRTTIMZON TIMZON(CENTRALDST) OFFSET(-360)
STDNAME(CTZ 'Central Time Zone')
DSTNAME(CDTZ 'Central Daylight Time Zone')
TEXT('Central Time Zone with Daylight Saving Time')
DSTSTR(*MAR *SUN 2 '02:00:00')
DSTEND(*NOV *SUN 1 '02:00:00')
ALTNAME('America/Chicago')
This command creates the CENTRALDST time zone description. The offset for the time zone is negative six hours (-360 minutes). The Standard Time abbreviated name of the time zone is 'CTZ' and the Standard Time full name of the time zone is 'Central Time Zone'. The Daylight Saving Time abbreviated name of the time zone is 'CDTZ' and the Daylight Saving Time full name is 'Central Daylight Time Zone'. The text description associated with the time zone description object is 'Central Time Zone with Daylight Saving Time'. This time zone description does observe Daylight Saving Time. Daylight Saving Time starts at 2:00 am on the second Sunday in March and ends at 2:00 am on the first Sunday in November. The alternate name of the time zone is 'America/Chicago'.
Example 3: Creating a Time Zone Description for a non-Gregorian Calendar
CRTTIMZON TIMZON(SAMPLETIMZ) OFFSET(+420)
STDNAME(*GEN) DSTNAME(*NONE)
TEXT('Time Zone for Thai Buddhist Calendar')
YEAROFS(-57)
This command creates the SAMPLETIMZ time zone description, which can be used with the Thai Buddhist calendar. The offset for the time zone is positive seven hours (+420 minutes), and the time zone description does not observe Daylight Saving Time. The Gregorian calendar year of 2006 was the year 2549 in the Thai Buddhist calendar. Therefore, many systems operated in the year 1949 when the Gregorian year was 2006. This represents a difference of negative 57 years (1949 minus 2006).
| Top |
| Top |