Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17590

Re: its quiet here - test

From "R.Wieser" <address@not.available>
Newsgroups comp.lang.php
Subject Re: its quiet here - test
Date 2017-10-25 18:51 +0200
Organization Aioe.org NNTP Server
Message-ID <osqff4$1dna$1@gioia.aioe.org> (permalink)
References <59f0365f$0$746$e4fe514c@news.xs4all.nl> <sO2IB.20191$fc3.527@fx35.iad>

Show all headers | View raw


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 ? :-)

> 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 
(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.  :-)

> 61 days until the winter celebration (Monday December 25, 2017 12:00:00 AM 
> for 1 day).

As long as you output in days, who cares about that one hour of that 25-hour 
day (and that other one of that 23-hour day) ?

Regards,
Rudy Wieser






"Mark Lloyd" <not@mail.invalid> wrote in message 
news:sO2IB.20191$fc3.527@fx35.iad...
> On 10/25/2017 01:59 AM, Luuk wrote:
>> what?
>>
>> On 25-10-17 00:01, Mark Lloyd wrote:
>
> It was in September when I first wrote the "dtc" (days until Christmas) 
> algorithm. It was expected to change the number of days at midnight, but 
> it was actually changing at 1AM. 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).
>
> Assuming a day always has 24 hours (24 * 60 * 60 = 86400 seconds) is one 
> of the common mistakes people make when working with dates.
>
> -- 
> 61 days until the winter celebration (Monday December 25, 2017 12:00:00
> AM for 1 day).
>
> Mark Lloyd
> http://notstupid.us/
>
> "Heresy is only another word for freedom of thought." [Graham Greene,
> 1981] 

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: its quiet here - test Luuk <luuk@invalid.lan> - 2017-10-25 08:59 +0200
  Re: its quiet here - test Mark Lloyd <not@mail.invalid> - 2017-10-25 11:17 -0500
    Re: its quiet here - test "R.Wieser" <address@not.available> - 2017-10-25 18:51 +0200
      Re: its quiet here - test Mark Lloyd <not@mail.invalid> - 2017-10-26 11:47 -0500
        Re: its quiet here - test "R.Wieser" <address@not.available> - 2017-10-27 01:04 +0200
          Re: its quiet here - test Mark Lloyd <not@mail.invalid> - 2017-10-26 18:23 -0500
            Re: its quiet here - test "R.Wieser" <address@not.available> - 2017-10-27 09:25 +0200
              Re: its quiet here - test Mark Lloyd <not@mail.invalid> - 2017-10-27 12:31 -0500

csiph-web