Create Time Zone Description (CRTTIMZON)
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:
- You must have read (*READ) and add (*ADD) authorities to the QSYS library.
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 |
TEXT |
Text 'description' |
Character value, *BLANK |
Optional |
AUT |
Authority |
Name, *USE, *LIBCRTAUT, *CHANGE, *ALL, *EXCLUDE |
Optional |
Time zone description (TIMZON)
Specifies the time zone description to be created. The time zone description is created in QSYS.
This is a required parameter.
- name
- Specify the name of the time zone description.
Offset (OFFSET)
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.
- -779 to 779
- Specify the time difference, in minutes. Valid values range from -779 minutes to 779 minutes.
Standard Time (STDNAME)
Specifies the abbreviated and full names of the time zone when Daylight Saving Time is not being observed.
Single values
- *GEN
- The system will generate the abbreviated and full names. The format of the abbreviated name will be the letters 'UTC' followed by the offset followed by the letter 'S'. The offset will appear as a formatted hour and minute value. The full name for the time zone description will be the same as the abbreviated name. For example, a time zone that has an offset of -360 minutes would have an abbreviated and a full name of 'UTC-06:00S'.
- *MSG
- The abbreviated and full names will be retrieved from the second-level message text of the message specified for the Standard Time message (STDMSG) parameter. When this value is specified, values must also be specified for the STDMSG parameter and the Message file (MSGF) parameter.
Element 1: Abbreviated name
- character-value
- Specify the abbreviated or short name for this time zone. The abbreviated name has a maximum length of 10 characters.
Element 2: Full name
- character-value
- Specify the full or long name for this time zone. The full name has a maximum length of 50 characters.
Daylight Saving Time (DST) (DSTNAME)
Specifies the abbreviated and full names of the time zone when Daylight Saving Time is being observed.
Single values
- *NONE
- This time zone does not observe Daylight Saving Time.
- *GEN
- The system will generate the abbreviated and full names. The format of the abbreviated name will be the letters 'UTC' followed by the offset followed by the letter 'D'. The offset will appear as a formatted hour and minute value. The full name for the time zone description will be the same as the abbreviated name. For example, a time zone that has an offset of -360 minutes would have an abbreviated and a full name of 'UTC-06:00D'.
- *MSG
- The abbreviated and full names will be retrieved from the second-level message text of the message specified for the Daylight Saving Time message (DSTMSG) parameter. When this value is specified, values must also be specified for the DSTMSG parameter and the Message file (MSGF) parameter.
Element 1: Abbreviated name
- character-value
- Specify the abbreviated or short name for this time zone. The abbreviated name has a maximum length of 10 characters.
Element 2: Full name
- character-value
- Specify the full or long name for this time zone. The full name has a maximum length of 50 characters.
Standard Time message (STDMSG)
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.
- name
- Specify the message identifier.
Daylight Saving Time message (DSTMSG)
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.
- name
- Specify the message identifier.
Message file (MSGF)
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
- name
- Specify the name of the message file.
Qualifier 2: Library
- *LIBL
- All libraries in the thread's library list are searched for the message file when the message is retrieved. The value *LIBL is saved in the time zone description and is not resolved to a library name by this command.
- name
- Specify the library where the message file is located.
Daylight Saving Time start (DSTSTR)
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
- *JAN
- Daylight Saving Time starts in January.
- *FEB
- Daylight Saving Time starts in February.
- *MAR
- Daylight Saving Time starts in March.
- *APR
- Daylight Saving Time starts in April.
- *MAY
- Daylight Saving Time starts in May.
- *JUN
- Daylight Saving Time starts in June.
- *JUL
- Daylight Saving Time starts in July.
- *AUG
- Daylight Saving Time starts in August.
- *SEP
- Daylight Saving Time starts in September.
- *OCT
- Daylight Saving Time starts in October.
- *NOV
- Daylight Saving Time starts in November.
- *DEC
- Daylight Saving Time starts in December.
Element 2: Day
- *MON
- Daylight Saving Time starts on a Monday.
- *TUE
- Daylight Saving Time starts on a Tuesday.
- *WED
- Daylight Saving Time starts on a Wednesday.
- *THU
- Daylight Saving Time starts on a Thursday.
- *FRI
- Daylight Saving Time starts on a Friday.
- *SAT
- Daylight Saving Time starts on a Saturday.
- *SUN
- Daylight Saving Time starts on a Sunday.
Element 3: Relative day of month
- *LAST
- Daylight Saving Time starts on the last occurrence of the specified day of the week.
- 1
- Daylight Saving Time starts on the first occurrence of the specified day of the week.
- 2
- Daylight Saving Time starts on the second occurrence of the specified day of the week.
- 3
- Daylight Saving Time starts on the third occurrence of the specified day of the week.
- 4
- Daylight Saving Time starts on the fourth occurrence of the specified day of the week.
Element 4: Time
- time
- Specify the time of day at which Daylight Saving Time starts. The time is specified in 24-hour format and can be specified with or without a time separator.
- Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Valid values for hh range from 00 to 23. Valid values for mm and ss range from 00 to 59.
- With a time separator, specify a string of 5 or 8 characters where the time separator specified for your job is used to separate the hours, minutes, and seconds. If this command is entered from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.
Daylight Saving Time end (DSTEND)
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
- *JAN
- Daylight Saving Time ends in January.
- *FEB
- Daylight Saving Time ends in February.
- *MAR
- Daylight Saving Time ends in March.
- *APR
- Daylight Saving Time ends in April.
- *MAY
- Daylight Saving Time ends in May.
- *JUN
- Daylight Saving Time ends in June.
- *JUL
- Daylight Saving Time ends in July.
- *AUG
- Daylight Saving Time ends in August.
- *SEP
- Daylight Saving Time ends in September.
- *OCT
- Daylight Saving Time ends in October.
- *NOV
- Daylight Saving Time ends in November.
- *DEC
- Daylight Saving Time ends in December.
Element 2: Day
- *MON
- Daylight Saving Time ends on a Monday.
- *TUE
- Daylight Saving Time ends on a Tuesday.
- *WED
- Daylight Saving Time ends on a Wednesday.
- *THU
- Daylight Saving Time ends on a Thursday.
- *FRI
- Daylight Saving Time ends on a Friday.
- *SAT
- Daylight Saving Time ends on a Saturday.
- *SUN
- Daylight Saving Time ends on a Sunday.
Element 3: Relative day of month
- *LAST
- Daylight Saving Time ends on the last occurrence of the specified day of the week.
- 1
- Daylight Saving Time ends on the first occurrence of the specified day of the week.
- 2
- Daylight Saving Time ends on the second occurrence of the specified day of the week.
- 3
- Daylight Saving Time ends on the third occurrence of the specified day of the week.
- 4
- Daylight Saving Time ends on the fourth occurrence of the specified day of the week.
Element 4: Time
- time
- Specify the time of day at which Daylight Saving Time ends. The time is specified in 24-hour format and can be specified with or without a time separator.
- Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Valid values for hh range from 00 to 23. Valid values for mm and ss range from 00 to 59.
- With a time separator, specify a string of 5 or 8 characters where the time separator specified for your job is used to separate the hours, minutes, and seconds. If this command is entered from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.
Text 'description' (TEXT)
Specifies the text that briefly describes the object.
- *BLANK
- No text is specified.
- character-value
- Specify no more than 50 characters of text, enclosed in apostrophes.
Authority (AUT)
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.
- *USE
- The user can perform basic operations on the time zone description, such as retrieving its contents. The user cannot change the time zone description. *USE authority provides object operational authority, read authority, and execute authority.
- *LIBCRTAUT
- The authority for the object is taken from the value specified for the Create authority (CRTAUT) parameter of the library in which the object is being created. If the value specified for the CRTAUT parameter is changed, the new value will not affect any existing objects.
- *CHANGE
- Change authority allows the user to change and perform basic functions on the object. The user can perform all operations on the object except those limited to the owner or controlled by object existence authority and object management authority. Change authority provides object operational authority and all data authority.
- *ALL
- The user performs all operations on the object except those limited to the owner.
- *EXCLUDE
- The user cannot access the object.
- name
- Specify the name of an authorization list to be used for authority to the object. Users included in the authorization list are granted authority to the object as specified in the list. The authorization list must exist when the object is created.
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(*APR *SUN 1 '02:00:00')
DSTEND(*OCT *SUN *LAST '02:00:00')
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 first Sunday in April and ends at 2:00 am on the last Sunday in October.
*ESCAPE Messages
- CPF09A1
- Time zone description &1 not created.