Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Dmitry Pavlov
That was more intended as a rant about things that drive me batty than actual instruction -- I hope it didn't come across as patronizing. No, not at all. One of the things that surprised me the most is that prior to 1925, astronomers kept timestamps of their observations where day started a

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Robby Findler
Date rants are the best :) http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time Robby On Thu, Oct 20, 2016 at 1:06 PM, David Storrs wrote: > That was more intended as a rant about things that drive me batty than > actual instruction -- I hope it didn't come across

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread David Storrs
That was more intended as a rant about things that drive me batty than actual instruction -- I hope it didn't come across as patronizing. On Thu, Oct 20, 2016 at 12:32 PM, Dmitry Pavlov wrote: > David, > > Yes, I deal with most of this at work, except daylight savings. > (Timestamps in astronomi

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Dmitry Pavlov
David, Yes, I deal with most of this at work, except daylight savings. (Timestamps in astronomical observations are predominantly in UTC or rarely TT/TDB, I never saw local time.) Best regards, Dmitry On 10/20/2016 07:26 PM, David Storrs wrote: Also be aware that once you start getting int

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread David Storrs
Also be aware that once you start getting into date math you need to deal with: *) Minutes that might have 61 seconds in them. Yes, hh:mm:60 is a real time. *) Hours that don't exist. *) Hours that happen twice in the same day. *) Februaries that have 28 or 29 days on a weird schedule. (If th

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Dmitry Pavlov
Matthew, Did you timezone use daylight saving in 1996? Oh, right. I need UTC date and time; I assumed it is UTC since I passed #f for dst? and 0 for time-zone-offset in (date). I missed the local-time? flag in date->seconds, which is true by default. So the corrected version of my code

Re: [racket-users] date->seconds complaining about a supposedly non-existent date

2016-10-20 Thread Matthew Flatt
Did you timezone use daylight saving in 1996? In U.S. timezones, March (it used to be April) has a 1-hour hole due to the switch to daylight saving time, where the clock skips forward from 1:59am to 3:00am. For example, 2:47:59am on March 13, 2016 really did not exist in my timezone. At Thu, 20 O