<br><br><div class="gmail_quote">On Wed, May 16, 2012 at 5:26 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
(cross posting to squeak-dev)<br>
<br>
On Wed, May 16, 2012 at 01:50:16PM -0700, Sean P. DeNigris wrote:<br>
&gt;<br>
&gt; David T. Lewis wrote<br>
&gt; &gt;<br>
&gt; &gt; So no, it is not a constant.<br>
&gt; &gt;<br>
&gt;<br>
&gt; Let me rephrase: wouldn&#39;t it be better if it was a constant, like dos and<br>
&gt; unix?<br>
<br>
Yes it would be better if the Smalltalk epoch was an unambiguously defined<br>
value, but unfortunately it is not. That is the reason that the clearly<br>
defined Posix epoch would be a more suitable basis for these calculations.<br></blockquote><div><br></div><div>I don&#39;t understand.  What is ambiguous about the start of the 20-th century in GMT?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
&lt;ot&gt;<br>
Funny that you should mention DOS. DOS has exactly the same problem<br>
as Squeak/Pharo in this regard. It was originally designed as a simple<br>
single-user system, where the user was expected to set the clock properly<br>
on all of his/her alarm clocks, kitchen appliances, and computers. It<br>
has no knowledge of time zones or daylight savings time, and this leads<br>
to all sorts of bugs in applications running on MS-DOS that assume that<br>
the system time is correct. I was dealing with a real-life bug of this<br>
sort last week that had people spending huge amounts of time and energy<br>
trying to figure out what was causing clocks to be &quot;reset&quot; in a complex<br>
multi-platform application that happened to include some old DOS based<br>
computers that were sending time stamped messages.<br>
&lt;/ot&gt;<br>
<br>
&gt; I find the current behavior confusing e.g.<br>
&gt;<br>
&gt; dt := &#39;1/15/2012 0000+00:00&#39; asDateAndTime.<br>
&gt;<br>
&gt; DateAndTime localTimeZone: (TimeZone timeZones detect: [ :e | e abbreviation<br>
&gt; = &#39;PDT&#39; ]).<br>
&gt; s := dt asSeconds. &quot;3504013200&quot;<br>
&gt;<br>
&gt; &quot;Now I move to Greenwich&quot;<br>
&gt; DateAndTime localTimeZone: (TimeZone timeZones detect: [ :e | e abbreviation<br>
&gt; = &#39;UTC&#39; ]).<br>
&gt; DateAndTime fromSeconds: s. &quot;2012-01-14T17:00:00+00:00&quot; &quot;Oops!&quot;<br>
&gt;<br>
<br>
Yes, that looks broken to me too. But DateAndTime class&gt;&gt;fromSeconds: is<br>
documented as &quot;Answer a DateAndTime since the Squeak epoch: 1 January 1901&quot;<br>
which by definition cannot be correctly implemented.<br>
<br>
One solution would be to gain agreement among all flavors of Smalltalk<br>
as to the proper definition of the Smalltalk epoch. But it seems to me<br>
that it would be vastly simpler to just use a definition that is already<br>
agreed and documented (i.e. Posix epoch), and leave the &quot;Smalltalk epoch&quot;<br>
behind as an interesting historical artifact.<br>
<br>
Dave<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>