Get Current Local Time (CEELOCT) API
Required Parameter Group:
1 |
output_Lilian |
Output |
INT4 |
2 |
output_seconds |
Output |
FLOAT8 |
3 |
output_Gregorian |
Output |
CHAR23 |
Omissible Parameter:
Service Program Name: QLEAWI
Default Public Authority: *USE
Threadsafe: Yes
The Get Current Local Time (CEELOCT) API returns the current local time in
three formats: Lilian date (the number of days since 14 October 1582), Lilian
timestamp (the number of seconds since 00:00:00 14 October 1582), and Gregorian
character string (in the form YYYYMMDDHHMISS999'). These values are compatible
with the other ILE date and time APIs and with existing language intrinsic
functions. CEELOCT performs the same service, faster, than calling CEEUTC,
CEEUTCO, and CEEDATM in succession.
Authorities and Locks
None.
Required Parameter Group
- output_Lilian (output)
- A 32-bit binary integer representing the current local date in the
Lilian format. That is, day 1 is 15 October 1582, day 148 887 is 4 June
1990. If local time is not available from the system, output_Lilian is
set to 0 and CEELOCT ends with a nonzero feedback code.
- output_seconds (output)
- A 64-bit double floating point number representing the current
local date and time as the number of seconds since 00:00:00 on 14 October
1582. For example, 00:00:01 on 15 October 1582 is second number 86 401
(24*60*60 + 01). 19:00:01.078 on 4 June 1990 is second number
12 863 905 201.078. If local time is not available from the
system, output_seconds is set to 0 and CEELOCT ends with a nonzero
feedback code.
- output_Gregorian (output)
- A 23-byte character field, where the leading 17 bytes contain a string in the form YYYYMMDDHHMISS999
representing local year, month, day, hour, minute, second, and millisecond.
The remaining 6 bytes are reserved and are currently set to the value 0.
Omissible Parameter
- fc (output)
- A 12-byte feedback code passed by reference. If specified as an argument,
feedback information (a condition token) is returned to the calling procedure.
If not specified and the requested operation was not successfully completed,
the condition is signaled to the condition manager.
Feedback Codes and Conditions
CEE0000 |
The API completed successfully |
Severity: 00 |
|
CEE2502 |
Local time not available |
Severity: 30 |
|
Usage Notes
-
Use CEEUTC to determine Universal Time Coordinated (UTC).
-
Use CEEUTCO to obtain the offset from UTC to local time.
-
The character value returned by CEELOCT is designed to match that produced
by existing language intrinsic functions. The numeric values returned can be
used to simplify date calculations.
-
If the format of output_Gregorian is inappropriate, CEEDATM can be
used to convert output_seconds to any required format.
Example
See Code disclaimer information
for information pertaining to code examples.
-
Extract current local date and time in the form
YYYYMMDDHHMISS999:
CALL CEELOCT (days, secs, localdatetime, fc);
API introduced: V2R3