On 10/25/2017 11:51 AM, R.Wieser wrote:
> Mark,
>
>> The reason being the 25-hour day in November (National mess-
>> with-your-clock day, where the hour 1:00:00 to 1:59:59 AM occurs twice).
>
> Isn't that day offsetted by another day somewhere in the spring, which is
> only 23 hours long ? Did you account for that one too ? :-)
It is in the case of finding the days until Christmas, when it's still
February (when you have BOTH the 23-hour day and the 25-hour day during
that interval). It does NOT offset it when your interval crosses only
ONE of those days (in my case, only one [the 25-hour day] comes between
September and December).
>> Assuming a day always has 24 hours (24 * 60 * 60 = 86400 seconds) is one
>> of the common mistakes people make when working with dates.
>
> The *most* common one is to try to write them yourself, instead of using the
> ones that are already available. > Just take the two date/times, have the OS convert them from local to UTC
That is irrelevant here, since both the times I'm concerned about
here(now and Christmas) are local times in the SAME timezone.
> (with respect to its summer/winter time), and you get an *exact* answer
> back, even accounting for the leap second that happens about once every four
> years. :-)
In this case, I had a correct interval in SECONDS, and needed to convert
it to days. Perhaps you could explain how you did THAT.
--
60 days until the winter celebration (Monday December 25, 2017 12:00:00
"He who hears this name [God] from a Jew must inform the authorities, or
else throw sow dung at him when he sees him and chase him away." [Martin
Luther,"On the Jews and Their Lies",1543]