ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/CEEUTCO.htm

231 lines
6.7 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>Get Offset from Universal Time Coordinated to Local Time (CEEUTCO)
API</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- ILE4A SCRIPT A converted by B2H R4.1 (346) (CMS) by NLJONES at -->
<!-- RCHVMX on 25 Feb 1999 at 10:53:17 -->
<!--Edited by Kersten Oct 2001 -->
<!-- End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<!-- Java sync-link -->
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<a name="Top_Of_Page"></a>
<h2>Get Offset from Universal Time Coordinated to Local
Time (CEEUTCO) API</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Required Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">offset_hours</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">INT4</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">offset_minutes</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">INT4</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">offset_seconds</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">FLOAT8</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Omissible Parameter:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">4</td>
<td align="left" valign="top" width="50%">fc</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">FEEDBACK</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Service Program Name: QLEAWI<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>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. <em>Offset_seconds</em> can be used
with CEEUTC to calculate local date and time. <em>Offset_hours</em> and <em>
offset_minutes</em> express the offset from UTC in terms of hours and
minutes.</p>
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
<!-- Instead, use the commented out coding below to indicate NONE. -->
<h3>Authorities and Locks</h3>
<!-- Use this if there are no authorities and locks. -->
<p>None.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>offset_hours (output)</strong></dt>
<dd>A 32-bit binary integer representing the offset from UTC to local time, in
hours; for Pacific Standard Time <em>offset_hours</em> is -8. The range for
<em>offset_hours</em> is -12 to -13, where +13 is Daylight Savings Time in the
+12 time zone. If local time offset is not available, <em>offset_hours</em> is
set to 0 and CEEUTCO ends with a nonzero feedback code.<br>
<br>
</dd>
<dt><strong>offset_minutes (output)</strong></dt>
<dd>A 32-bit binary integer representing the number of additional minutes that
local time is ahead of, or behind, UTC. The range for <em>offset_minutes</em>
is 0 to 59. If the local time offset is not available, <em>offset_minutes</em>
is set to 0 and CEEUTCO ends with a nonzero feedback code.<br>
<br>
</dd>
<dt><strong>offset_seconds (output)</strong></dt>
<dd>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&nbsp;800 (-8 * 60 * 60). The range for <em>
offset_seconds</em> is -43&nbsp;200 to +46&nbsp;800. If the local time offset
is not available from the system, <em>offset_seconds</em> is set to 0 and
CEEUTCO ends with a nonzero feedback code.</dd>
</dl>
<br>
<h3>Omissible Parameter</h3>
<dl>
<dt><strong>fc (output)</strong></dt>
<dd>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.</dd>
</dl>
<br>
<h3>Feedback Codes and Conditions</h3>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top">CEE0000</td>
<td align="left" valign="top">The API completed successfully</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 00</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">CEE2503</td>
<td align="left" valign="top">UTC offset not available</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 30</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">CEE9902</td>
<td align="left" valign="top">Unexpected user error occurred in &amp;1</td>
</tr>
<tr>
<td align="left" valign="top">Severity: 30</td>
<td align="left" valign="top">&nbsp;</td>
</tr>
</table>
<br>
<h3>Usage Notes</h3>
<ul>
<li>The values returned by CEEUTCO and CEEUTC can be used together to calculate
the local date and time.</li>
<li>The CEEDATM API can be used to convert number of seconds to character
timestamp.<br>
<br>
</li>
</ul>
<br>
<h3>Example</h3>
<p>See <a href="../apiref/aboutapis.htm#codedisclaimer">Code disclaimer information</a>
for information pertaining to code examples.</p>
<ul>
<li>Extract current UTC and convert to local date and time in <samp>YYYY-MM-DD
HH.MM.SS</samp> format:
<pre>
CALL CEEUTC (days, secs, fc);
CALL CEEUTCO (hrs, mins, secoffset, fc);
secs = secs + secoffset;
CALL CEEDATM (secs, 'YYYY-MM-DD HH.MI.SS', timestmp,
fc);
</pre>
</li>
</ul>
<br>
<hr>
API introduced: V2R3
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"ile1a1.htm">ILE CEE APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
</body>
</html>