<div dir="ltr">Hi Chris,<div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 27, 2016 at 8:31 AM, Chris Cunningham <span dir="ltr">&lt;<a href="mailto:cunningham.cb@gmail.com" target="_blank">cunningham.cb@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 dir="ltr">So, Time and Dates are hard.  When Date was a magnitude, it was easy.  Now that it is a duration, it is occassionally wrong.  Think about daylight savings time - at least one a year the day length is 25 hours, and once it is 23 hours (although in some places there are no Daylight Savings, so this isn&#39;t true, and in others, there are 2 switches, so it happens twice).  Our current implementation doesn&#39;t take this into account - which is reasonable because it is hard to take this into account without a lot of work.<div><br></div><div>If we want to keep Date as a timespan (with rough correctness), maybe we could also add in Day (as a magnitude) to work like the old Date?</div></div></blockquote><div><br></div><div>That&#39;s what I wonder.  Can&#39;t we simply store the start time (ideally UTC microseconds or local microseconds) internally and then compute the duration programmatically, depending on the timezone in effect?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>For what it is worth, I spend &gt;80% of my time working with dates/timestamps, trying to turn them into Magnitudes for manipulations.  The other 20%, I really enjoy them as timespans with locales since I deal with times from around the world.  But the two uses are not quite easy to deal with - doable, just not quite intuitive.</div></div></blockquote><div><br></div><div>So if we store the start time isn&#39;t the conversion to a magnitude simply an inst var access?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>-cbc</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 27, 2016 at 3:41 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Mon, Jun 27, 2016 at 5:30 AM, 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">A bit off topic, but is is worth asking:<br>
If we really want to model Date as a position on a continuum of date<br>
values, and if we think that the implementation of Date as a kind of<br>
Timespan is not right, then shouldn&#39;t we just consider going back to<br>
the earlier (Squeak 3.6 and earlier) implementation of Date as a Magnitude,<br>
rather than Date as a Timespan?<br></blockquote><div><br></div></span><div>I think this is a very relevant question. We may have to distinguish a Day from a Date.</div><div><br></div><div>IMHO a birthday is a perfect example. It&#39;s defined by a day+month+year. If I was traveling I would celebrate the birthday in local time, so the generic &quot;birthday&quot; needs to compare equal to all the local dates independent of time zone.</div><div><br></div><div>This is how Dates worked before we made them Timespans (because they had no time, and hence no time zone). And this is also how they worked after I added the &quot;nil&quot; offset hack (which ignores the timezone). But it&#39;s a hack, not a good design. I&#39;m not entirely sure what a good design would look like that also does not break old code.</div><span><font color="#888888"><div><br></div><div>- Bert -</div></font></span></div><br></div></div>
<br><br>
<br></blockquote></div><br></div>
</div></div><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>