Get Offset from Universal Time Coordinated to Local Time (CEEUTCO) API


  Required Parameter Group:

1 offset_hours Output INT4
2 offset_minutes Output INT4
3 offset_seconds Output FLOAT8

  Omissible Parameter:

4 fc Output FEEDBACK

  Service Program Name: QLEAWI

  Default Public Authority: *USE

  Threadsafe: Yes

The Get Offset from Universal Time Coordinated to Local Time (CEEUTCO) API provides three values representing the current offset from Universal Time Coordinated (UTC) to local system time. Offset_seconds can be used with CEEUTC to calculate local date and time. Offset_hours and offset_minutes express the offset from UTC in terms of hours and minutes.

Authorities and Locks

None.


Required Parameter Group

offset_hours (output)
A 32-bit binary integer representing the offset from UTC to local time, in hours; for Pacific Standard Time offset_hours is -8. The range for offset_hours is -12 to -13, where +13 is Daylight Savings Time in the +12 time zone. If local time offset is not available, offset_hours is set to 0 and CEEUTCO ends with a nonzero feedback code.

offset_minutes (output)
A 32-bit binary integer representing the number of additional minutes that local time is ahead of, or behind, UTC. The range for offset_minutes is 0 to 59. If the local time offset is not available, offset_minutes is set to 0 and CEEUTCO ends with a nonzero feedback code.

offset_seconds (output)
A 64-bit double floating point (output) number representing the offset from UTC to local time, in seconds. For example, Pacific Standard Time is eight hours behind UTC. If the system is in the Pacific time zone during standard time, CEEUTCO returns -28 800 (-8 * 60 * 60). The range for offset_seconds is -43 200 to +46 800. If the local time offset is not available from the system, offset_seconds is set to 0 and CEEUTCO ends with a nonzero feedback code.

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  
CEE2503 UTC offset not available
Severity: 30  
CEE9902 Unexpected user error occurred in &1
Severity: 30  

Usage Notes


Example

See Code disclaimer information for information pertaining to code examples.



API introduced: V2R3
Top | ILE CEE APIs | APIs by category