[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: calendar gets wrong end for Daylight Savings Time
From: |
Glenn Morris |
Subject: |
Re: calendar gets wrong end for Daylight Savings Time |
Date: |
Thu, 09 Nov 2006 15:32:18 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Eli Zaretskii wrote:
> In C, you pass probe time_t values to the function localtime, until
> you find the value for which the tm_isdst flag in the struct tm
> returned by localtime changes from 0 to 1 or vice versa.
>
> In Lisp, we will need some Lisp binding to localtime or its sibling
> functions, to do the same. Perhaps the iterative solution can be
> coded in C, with only the result exposed to Lisp.
>
> Does this make sense? Apologies if I'm missing something.
No, this makes sense. I'm trying to say, this essentially is what
cal-dst does already (see calendar-next-time-zone-transition) to find
the dates when DST starts/ends. But it (essentially) just does it
once, for the next year, then assumes that the result it gets applies
to every year. I have presented a patch which makes it do this
iterative check for every year, the first time it encounters a given
year. It doesn't seem to take an appreciable amount of time, so I
don't think it's necessary to rewrite it in C.
- Re: calendar gets wrong end for Daylight Savings Time, (continued)
- Re: calendar gets wrong end for Daylight Savings Time, James Cloos, 2006/11/09
- Re: calendar gets wrong end for Daylight Savings Time, Glenn Morris, 2006/11/09
- Re: calendar gets wrong end for Daylight Savings Time, Eli Zaretskii, 2006/11/08
- Re: calendar gets wrong end for Daylight Savings Time, Glenn Morris, 2006/11/09
- Re: calendar gets wrong end for Daylight Savings Time, Glenn Morris, 2006/11/09
- Re: calendar gets wrong end for Daylight Savings Time, Eli Zaretskii, 2006/11/09
- Re: calendar gets wrong end for Daylight Savings Time,
Glenn Morris <=