<div><br></div>I agree Chris. If I&#39;m interested in anything time-related for a given date, I&#39;ll use DateAndTime or TimeStamp or whatever. Date objects should care about year and month and day, and nothing more.<div>
<br></div><div>Incidentally, the place I&#39;m using Dates that is screwing me up so badly is as the key to a Dictionary, so of course the TZ offset makes it so the key lookup fails when you change TZ&#39;s.</div><div><br>
</div><div>- Jon</div><div><br><br><div class="gmail_quote">On Thu, Feb 2, 2012 at 11:25 AM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Feb 2, 2012 at 2:30 AM, Nicolas Cellier<br>
&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt; I&#39;m now inspecting implementation, and indeed, Date is an interval<br>
&gt; taking start time into account.<br>
&gt; So you can still compare the Date printString... (quite slow).<br>
<br>
</div>Not good enough, because having TZ-specific dates in any system of<br>
consequence is a scourge of molasses.<br>
<br>
Best to strip all Dates (NOT DateAndTimes) of their timezone.<br>
<div class="im"><br>
&gt; I read that makeUTC is like asUTC but it&#39;s not.<br>
&gt; The former just erase the offset, the later does remove the offset from time.<br>
&gt;<br>
&gt; t := DateAndTime year: 2012 month: 2 day: 1 hour: 9 minute: 8 second:<br>
&gt; 23 offset: 2 hours.<br>
&gt; self deny: t asUTC = t copy makeUTC<br>
<br>
</div>makeUTC was intended solely to purge the molasses for apps that are<br>
not interested in TZ&#39;s.<br>
<div class="im"><br>
&gt; Since midnight is used in Date creation, I now have the answer how<br>
&gt; germane it is to compare the dates of two DateAndTime.<br>
&gt;<br>
&gt; d1 := DateAndTime starting: (DateAndTime year: 2012 month: 2 day: 1<br>
&gt; hour: 15 minute: 0 second: 0 offset: 8 hours).<br>
&gt; d2 := DateAndTime starting: (DateAndTime year: 2012 month: 2 day: 1<br>
&gt; hour: 20 minute: 0 second: 0 offset: 0 hours).<br>
&gt; self guess: d1 asDate = d2 asDate answer: &#39;it depends on your local time zone&#39;.<br>
&gt;<br>
&gt; Well, why not, but good luck to write the SUnitTests, you have to<br>
&gt; modify a global (time zone) to make them work reliably ;)<br>
<br>
</div>We&#39;ve made something wrong and we&#39;ve made it slow in the process.<br>
Apps that care about timezones will use DateAndTimes.  Apps that don&#39;t<br>
shouldn&#39;t be punished.<br>
<br>
I propose Date&#39;s, by default, be created with the UTC offset, NOT the<br>
local offset.<br>
<span class="HOEnZb"><font color="#888888"><br>
 - Chris<br>
<br>
</font></span></blockquote></div><br></div>