On Tue, Nov 8, 2016 at 6:26 PM, Jon Zeppieri <[email protected]> wrote:

>
>
> On Tue, Nov 8, 2016 at 6:18 PM, George Neuner <[email protected]>
> wrote:
>
>>
>> On 11/8/2016 2:29 PM, Robby Findler wrote:
>>
>>> find-seconds returns a number, not a date? Maybe seconds->date is the
>>> culprit here?
>>>
>>> Robby
>>>
>>
>> Spoke too soon.  1 combination gets it right:  (seconds->date
>> (find-seconds ... #F) #T).
>>
>> Note that (for me)  Nov 6 should be DST [until 2AM], but Nov 7 should be
>> EST.
>>
>>   ------------------------------
>> (require racket/date)
>>
>> (seconds->date (find-seconds 0 0 0 6 11 2016 #f) #f)
>> (seconds->date (find-seconds 0 0 0 6 11 2016 #f) #t)
>> (seconds->date (find-seconds 0 0 0 6 11 2016 #t) #f)
>> (seconds->date (find-seconds 0 0 0 6 11 2016 #t) #t)
>> (displayln "")
>> (seconds->date (find-seconds 0 0 0 7 11 2016 #f) #f)
>> (seconds->date (find-seconds 0 0 0 7 11 2016 #f) #t)
>> (seconds->date (find-seconds 0 0 0 7 11 2016 #t) #f)
>> (seconds->date (find-seconds 0 0 0 7 11 2016 #t) #t)
>>
>> =>
>> date* 0 0 0 6 11 2016 0 310 #f 0 0 "UTC")
>> (date* 0 0 20 5 11 2016 6 309 #t -14400 0 "Eastern Daylight Time")
>> (date* 0 0 4 6 11 2016 0 310 #f 0 0 "UTC")
>> (date* 0 0 0 6 11 2016 0 310 #t -14400 0 "Eastern Daylight Time")
>>
>> (date* 0 0 0 7 11 2016 1 311 #f 0 0 "UTC")
>> (date* 0 0 19 6 11 2016 0 310 #f -18000 0 "Eastern Standard Time")
>> (date* 0 0 5 7 11 2016 1 311 #f 0 0 "UTC")
>> (date* 0 0 0 7 11 2016 1 311 #t -14400 0 "Eastern Daylight Time")
>>   ------------------------------
>>
>>
>
> George, these are not correct results. The UTC offset is correct, but the
> time fields are not -- under the assumption that you're trying to
> round-trip them unchanged. (But maybe that's not a correct assumption.) At
> any rate, I think your original example demonstrates a problem with
> seconds->date on Windows.
>
>
>


Sorry, that was confusing. What I meant to say was: the results are correct
(given the treatment of the original date fields as UTC and the treatment
of the resulting seconds as local), but based on your original post, I
don't think they're the results you were after. But I'm not certain of that.

- Jon

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to