Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17588 > unrolled thread
| Started by | Luuk <luuk@invalid.lan> |
|---|---|
| First post | 2017-10-25 08:59 +0200 |
| Last post | 2017-10-27 12:31 -0500 |
| Articles | 8 — 3 participants |
Back to article view | Back to comp.lang.php
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
| From | Luuk <luuk@invalid.lan> |
|---|---|
| Date | 2017-10-25 08:59 +0200 |
| Subject | Re: its quiet here - test |
| Message-ID | <59f0365f$0$746$e4fe514c@news.xs4all.nl> |
what? On 25-10-17 00:01, Mark Lloyd wrote:
[toc] | [next] | [standalone]
| From | Mark Lloyd <not@mail.invalid> |
|---|---|
| Date | 2017-10-25 11:17 -0500 |
| Message-ID | <sO2IB.20191$fc3.527@fx35.iad> |
| In reply to | #17588 |
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]
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2017-10-25 18:51 +0200 |
| Message-ID | <osqff4$1dna$1@gioia.aioe.org> |
| In reply to | #17589 |
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]
[toc] | [prev] | [next] | [standalone]
| From | Mark Lloyd <not@mail.invalid> |
|---|---|
| Date | 2017-10-26 11:47 -0500 |
| Message-ID | <_koIB.20850$2w2.3757@fx16.iad> |
| In reply to | #17590 |
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]
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2017-10-27 01:04 +0200 |
| Message-ID | <ostpll$166r$1@gioia.aioe.org> |
| In reply to | #17592 |
Mark, > 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). .... Or any day after chrismas but before the first summer-time day (a two-and-a-half month stretch.) Regards, Rudy Wieser
[toc] | [prev] | [next] | [standalone]
| From | Mark Lloyd <not@mail.invalid> |
|---|---|
| Date | 2017-10-26 18:23 -0500 |
| Message-ID | <f8uIB.64619$kA2.34379@fx39.iad> |
| In reply to | #17596 |
On 10/26/2017 06:04 PM, R.Wieser wrote: > Mark, > >> 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). > > .... Or any day after chrismas but before the first summer-time day (a > two-and-a-half month stretch.) Yes. I was using February as an example. More generally, an EQUAL number of DST beginnings and DST endings between now and the event you're counting down to. > Regards, > Rudy Wieser > > -- 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]
[toc] | [prev] | [next] | [standalone]
| From | "R.Wieser" <address@not.available> |
|---|---|
| Date | 2017-10-27 09:25 +0200 |
| Message-ID | <osun21$dkj$1@gioia.aioe.org> |
| In reply to | #17597 |
Mark, > Yes. I was using February as an example. Than its good to hear you where not forgetting about that other, as important day than the one with 25 hours you shone your spotlight on. Regards, Rudy Wieser
[toc] | [prev] | [next] | [standalone]
| From | Mark Lloyd <not@mail.invalid> |
|---|---|
| Date | 2017-10-27 12:31 -0500 |
| Message-ID | <64KIB.34084$_63.24213@fx12.iad> |
| In reply to | #17600 |
On 10/27/2017 02:25 AM, R.Wieser wrote: > Mark, > >> Yes. I was using February as an example. > > Than its good to hear you where not forgetting about that other, as > important day than the one with 25 hours you shone your spotlight on. > > Regards, > Rudy Wieser I had not mentioned the 23-hour day because it does not occur during the interval between NOW and Christmas. -- 59 days until the winter celebration (Monday December 25, 2017 12:00:00 AM for 1 day). Mark Lloyd http://notstupid.us/ "My mind is my own church." -- Thomas Paine
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web