1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="Start" href="index.html">
<link rel="next" href="Period.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Time_Zone" rel="Chapter" href="Time_Zone.html">
<link title="Period" rel="Chapter" href="Period.html">
<link title="Time" rel="Chapter" href="Time.html">
<link title="Date" rel="Chapter" href="Date.html">
<link title="Calendar" rel="Chapter" href="Calendar.html">
<link title="Printer" rel="Chapter" href="Printer.html"><title>Time_Zone</title>
</head>
<body>
<div class="navbar"> <a href="index.html">Up</a>
<a href="Period.html">Next</a>
</div>
<center><h1>Module <a href="type_Time_Zone.html">Time_Zone</a></h1></center>
<br>
<pre><span class="keyword">module</span> Time_Zone: <code class="code">sig</code> <a href="Time_Zone.html">..</a> <code class="code">end</code></pre>Time zone management.
<p>
You can <code class="code">change</code> the <code class="code">current</code> time zone in your program by side effect.<br>
<hr width="100%">
<br><code><span class="keyword">type</span> <a name="TYPEt"></a><code class="type"></code>t = </code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">UTC</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><code>Greenwich Meridian Time</code></td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">Local</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><code>Local Time</code></td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">UTC_Plus</span> <span class="keyword">of</span> <code class="type">int</code></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><code>Another time zone specified from UTC</code></td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
<div class="info">
Type of a time zone.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcurrent"></a>current : <code class="type">unit -> <a href="Time_Zone.html#TYPEt">t</a></code></pre><div class="info">
Return the current time zone. It is <code class="code">UTC</code> before any change.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALchange"></a>change : <code class="type"><a href="Time_Zone.html#TYPEt">t</a> -> unit</code></pre><div class="info">
Change the current time zone by another one.
Raise <code class="code">Invalid_argument</code> if the specified time zone is <code class="code">UTC_Plus x</code> with
x < -12 or x > 11<br>
</div>
<pre><span class="keyword">val</span> <a name="VALgap"></a>gap : <code class="type"><a href="Time_Zone.html#TYPEt">t</a> -> <a href="Time_Zone.html#TYPEt">t</a> -> int</code></pre><div class="info">
Return the gap between two time zone.
E.g. <code class="code">gap UTC (UTC_Plus 5)</code> returns 5 and, at Paris in summer,
<code class="code">gap Local UTC</code> returns -2.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfrom_gmt"></a>from_gmt : <code class="type">unit -> int</code></pre><div class="info">
<code class="code">from_gmt ()</code> is equivalent to <code class="code">gap UTC (current ())</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALto_gmt"></a>to_gmt : <code class="type">unit -> int</code></pre><div class="info">
<code class="code">to_gmt ()</code> is equivalent to <code class="code">gap (current ()) UTC</code>.<br>
</div>
</body></html>
|