ILE COBOL Programmer's Guide
In ILE COBOL, the LC_TOD locale category dictates the timezone for a locale
based time item. In particular the tzdiff keyword specifies the
difference between the local time and Greenwich mean time. This
information is used when moving or comparing a locale based time item to
another time (locale or non-locale based). The tzdiff keyword is the
only LC_TOD keyword currently used by ILE COBOL.
The LC_TOD category defines the rules used to define the start and end time
of daylight savings time, the difference between local time and Greenwich Mean
time, the time zone name, and the daylight savings time name. This
category is an IBM extension and must appear after all other category
definitions in the source file.
All the operands for the LC_TOD category are defined as string or integer
values. String values are bounded by double-quotation marks
(""). All values are separated from the keyword they define by one or
more spaces. Two adjacent double-quotation marks indicate an undefined
string value. A 0 (zero) indicates an undefined integer value.
The following keywords are recognized in the LC_TOD category.
- tzdiff
- Specifies an integer value representing the time zone difference in
minutes. It is the difference between the local time and Greenwich mean
time.
- tname
- Specifies the string used for the time zone name.
- dstname
- Specifies the string used for the daylight savings time name.
- dststart
- Specifies a set of four integers representing the start date for the
daylight savings time. The operand for the dststart keyword consists of
a sequence of four comma-separated integers in the following format:
month,week,day,time
The variables for the dststart format are defined as:
- month
- Specifies an integer value representing the month of the year when
Daylight Savings Time (DST) takes effect. This value ranges from 1 to
12, with 1 corresponding to January, and 12 corresponding to December.
- week
- Specifies an integer value representing the week of the month when DST
takes effect. This value ranges from -4 to 4, with -4 corresponding to
the fourth week of the month counting from the end of the month and 4
corresponding to the fourth week of the month counting from the beginning of
the month.
- day
- Specifies an integer value representing the day of the month when DST
takes effect or if the week keyword is not 0 (zero), then this is the day of
the week when DST takes effect. This value ranges from 1 to the last
day of the month or 1 to the last day of the week.
- time
- Specifies an integer value representing the number of seconds after 12
midnight, local standard time, when DST takes effect. This value ranges
from 0 to 86399.
- dstend
- Specifies a set of four integers representing the end date for the
daylight savings time. The operand for the dstend keyword consists of a
sequence of four comma-separated integers in the following format:
month,week,day,time
The variables for the dstend format are defined as:
- month
- Specifies an integer value representing the month of the year when
Daylight Savings Time (DST) ends. This value ranges from 1 to 12, with
1 corresponding to January, and 12 corresponding to December.
- week
- Specifies an integer value representing the week of the month when DST
ends. This value ranges from -4 to 4, with -4 corresponding to the
fourth week of the month counting from the end of the month and 4
corresponding to the fourth week of the month counting from the beginning of
the month.
- day
- Specifies an integer value representing the day of the month when DST ends
or if the week keyword is not 0 (zero), then this is the day of the week when
DST ends. This value ranges from 1 to the last day of the month or 1 to
the last day of the week.
- time
- Specifies an integer value representing the number of seconds after 12
midnight, local standard time, when DST takes effect. This value ranges
from 0 to 86399.
- dstshift
- Specifies an integer value representing the daylight savings time shift in
seconds.
The following is an example of a LC_TOD category in a locale definition
source file:
LC_TOD
#
tzdiff 360
tname "<C><e><n><t><r><a><l>"
dstname "<P><D><T>"
#Set daylight savings time to start on 3rd week of October at
#midnight on Saturday.
dststart 10,3,6,0
#Set daylight savings time to end on April 23, at midnight.
dstend 4,0,23,0
dstshift 3600
#
END LC_TOD
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.