Thanks very much for tracking down the problem! I've pushed a repair.

At Tue, 8 Nov 2016 17:31:53 -0500, Jon Zeppieri wrote:
> I think Robby is right and the problem is here:
> https://github.com/racket/racket/blob/4ce947da74d09abc9cda10a14e7407cda9386a44/
> racket/src/racket/src/fun.c#L9876
> 
> Well, that and the next line. There's only a `return 1;` for the case where
> the given day-of-month is less than the DST change's day-of-month, but no
> `return 0;` for the case where it's greater. All of the other comparisons
> use the `dtxCOMP` macro, which handles both cases:
> 
> ```
> # define dtxCOMP(f) if (a->f < b->f) return 1; if (a->f > b->f) return 0;
> ```
> 
> Does that sound right? I don't have a Windows system at the moment, and I
> can't reproduce on OS X.
> 
> 
> - Jon
> 
> 
> 
> 
> On Tue, Nov 8, 2016 at 2:29 PM, Robby Findler <ro...@eecs.northwestern.edu>
> wrote:
> 
> > find-seconds returns a number, not a date? Maybe seconds->date is the
> > culprit here?
> >
> > Robby
> >
> > On Tue, Nov 8, 2016 at 12:32 PM, George Neuner <gneun...@comcast.net>
> > wrote:
> > >
> > > Racket 6.6 on Windows 7.
> > >
> > > find-seconds is getting the time zone wrong when local-time? is #t.
> > > Somehow it is in daylight saving all through November.
> > >
> > > When local-time? is #f (UTC) the time zone and hour offset are
> > > correct. [At least for "fall back", didn't check "spring ahead"]
> > >
> > >
> > >
> > > (for* [(m '(11 12))
> > >        (d (in-range 1 31))
> > >        #:unless [and (= m 12)(> d 5)]
> > >       ]
> > >   (println (seconds->date (find-seconds 0 0 0 d m 2016 #t))))
> > >
> > > =>
> > > (date* 0 0 0 1 11 2016 2 305 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 2 11 2016 3 306 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 3 11 2016 4 307 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 4 11 2016 5 308 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 5 11 2016 6 309 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 6 11 2016 0 310 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 7 11 2016 1 311 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 8 11 2016 2 312 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 9 11 2016 3 313 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 10 11 2016 4 314 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 11 11 2016 5 315 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 12 11 2016 6 316 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 13 11 2016 0 317 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 14 11 2016 1 318 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 15 11 2016 2 319 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 16 11 2016 3 320 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 17 11 2016 4 321 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 18 11 2016 5 322 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 19 11 2016 6 323 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 20 11 2016 0 324 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 21 11 2016 1 325 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 22 11 2016 2 326 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 23 11 2016 3 327 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 24 11 2016 4 328 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 25 11 2016 5 329 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 26 11 2016 6 330 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 27 11 2016 0 331 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 28 11 2016 1 332 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 29 11 2016 2 333 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 30 11 2016 3 334 #t -14400 0 "Eastern Daylight Time")
> > > (date* 0 0 0 1 12 2016 4 335 #f -18000 0 "Eastern Standard Time")
> > > (date* 0 0 0 2 12 2016 5 336 #f -18000 0 "Eastern Standard Time")
> > > (date* 0 0 0 3 12 2016 6 337 #f -18000 0 "Eastern Standard Time")
> > > (date* 0 0 0 4 12 2016 0 338 #f -18000 0 "Eastern Standard Time")
> > > (date* 0 0 0 5 12 2016 1 339 #f -18000 0 "Eastern Standard Time")
> > >
> > >
> > > George
> > >
> > > --
> > > You received this message because you are subscribed to the Google
> > Groups "Racket Users" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > an email to racket-users+unsubscr...@googlegroups.com.
> > > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to