<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
Hi, <br>
<br>
I agree, there must be something wrong, the following example gets
the time, converts it to Unix Epoch and then reads the Unix Epoch
back in local time. It fails.<br>
<br>
AFAICsay, the Unix epoch is correct.<br>
<br>
---- <br>
<br>
<font color="#000099">DateAndTime now.</font><br>
" 2019-09-28T<b>02:10</b>:32.361354<b>-07:00</b>"<br>
<br>
<font color="#000099">(DateAndTime now) asUnixTime. </font><br>
" 1569662550"<br>
<br>
<font color="#000099">DateAndTime fromUnixTime: 1569662550. </font><br>
"2019-09-28T<b>09:22</b>:30<b>-07:00</b>"<br>
<br>
----<br>
<br>
bye<br>
nicola<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 9/27/19 10:28 PM, John-Reed Maffeo
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAEUV3XBqQPZ62i-cmTDitztY=YhLAGpKsxrCUNkYhzxKirJ16w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_default" style="font-size:small">When I
execute :</div>
<div>DateAndTime fromUnixTime: 1569648600</div>
<div>
<div style="font-size:small" class="gmail_default">The value I
get is : 2019-09-28T05:30:00-07:00</div>
<div style="font-size:small" class="gmail_default"><br>
</div>
<div style="font-size:small" class="gmail_default">This looks
wrong to me because UNIX time is supposed to be in UTC and
the value shows an offset of -07:00 hours which I assume is
the offset for Mountain Standard Time in the US.</div>
<div style="font-size:small" class="gmail_default"><br>
</div>
<div style="font-size:small" class="gmail_default">My
understanding is that the UTC value should be
2019-09-28T05:30:00-00:00</div>
<div style="font-size:small" class="gmail_default">and I would
have to convert it to 2019-09-27T10:30:00-07:00 to get the
local time.</div>
<div style="font-size:small" class="gmail_default"><br>
</div>
<div style="font-size:small" class="gmail_default">If the
method #fromUnixTime is expected to return a value with the
local timezone offset, then the time value should be
adjusted to local time to match the offset.</div>
<div style="font-size:small" class="gmail_default"><br>
</div>
<div style="font-size:small" class="gmail_default">However, I
don't think that a UNIX time value should be represented in
anything but UTC and the application should decide when and
how to modify it. <br>
</div>
<div style="font-size:small" class="gmail_default"><br>
</div>
</div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div><span class="gmail_default" style="font-size:small">- jrm</span><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">
</pre>
</blockquote>
<br>
</body>
</html>