Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17592
| Subject | Re: its quiet here - test |
|---|---|
| Newsgroups | comp.lang.php |
| References | <59f0365f$0$746$e4fe514c@news.xs4all.nl> <sO2IB.20191$fc3.527@fx35.iad> <osqff4$1dna$1@gioia.aioe.org> |
| From | Mark Lloyd <not@mail.invalid> |
| Message-ID | <_koIB.20850$2w2.3757@fx16.iad> (permalink) |
| Organization | Newshosting.com - Highest quality at a great price! www.newshosting.com |
| Date | 2017-10-26 11:47 -0500 |
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. >> 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] > > -- 60 days until the winter celebration (Monday December 25, 2017 12:00:00 AM for 1 day). Mark Lloyd http://notstupid.us/ "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]
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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