[BUGS] Don't get caught this sunday with no DST changes

jonathan michaels jlm at caamora.com.au
Thu Mar 27 22:05:22 EST 2008


On Thu, Mar 27, 2008 at 08:39:30PM +1100, Edwin Groothuis wrote:
> On Thu, Mar 27, 2008 at 08:35:10PM +1100, jonathan michaels wrote:
> > > > $ perl -e 'use POSIX;print "Date = ", POSIX::ctime(1206529200 + 86400 * 0);'
> > > > Date = Wed Mar 26 22:00:00 2008
> > > > 
> > > > $ perl -e 'use POSIX;print "Date = ", POSIX::ctime(1206529200 + 86400 * 7);'
> > > > Date = Wed Apr  2 22:00:00 2008
> > > > 
> > > > $ perl -e 'use POSIX;print "Date = ", POSIX::ctime(1206529200 + 86400 * 14);'
> > > > Date = Wed Apr  9 21:00:00 2008
> > > > 
> > > > i thought i'd gotten it nailed but then i tried the last one
> > > > and saw the 21:00:00, again.  just to check if it is not an
> > > > anomily i also tried one at 28 days, as well as using the shell
> > > > scripts one liners as per provided examples.
> > > 
> > > That's the expected result: It should be 22:00 on the second wednesday
> > > and 21:00 in the third wednesday.
> > 
> > sorry edwing it seems to me that i have missed something here
> > but i don't seem to be able to work out what it is that i have
> > missed, my brain is telling me that i am supposed to be seeing
> > teh 22:00:00 going forward .. i am stuck in a closed loop that
> > i cannot break out off, i would appreciate some help please.
> 
> Before you should have:
> 
>     $ date -r `expr 1206529200` 
>     Wed Mar 26 22:00:00 EST 2008
>     $ date -r `expr 1206529200 + 86400 \* 7` 
>     Wed Apr  2 21:00:00 EST 2008
>     $ date -r `expr 1206529200 + 86400 \* 14` 
>     Wed Apr  9 21:00:00 EST 2008
> 
> 22:00 - *21*:00 - 21:00
> 
> And afterwards you should have:
> 
>     $ date -r `expr 1206529200` 
>     Wed Mar 26 22:00:00 EST 2008
>     $ date -r `expr 1206529200 + 86400 \* 7` 
>     Wed Apr  2 22:00:00 EST 2008
>     $ date -r `expr 1206529200 + 86400 \* 14` 
>     Wed Apr  9 21:00:00 EST 2008
> 
> 22:00 - *22*:00 - 21:00
> 
> The 21 on 2 April has been changed to 22. That's the expected
> behaviour.

this i now understand, and this is because the dst has ended ..
it has been an awkward day, just a bit slower than usual.

all finished, all done all working all good ..

quick, somebody, anybody, where are those little green ones ???

much kind regards thanks appreciations

cheers

jonathan (teh slow one)

-- 
================================================================
powered by ..
QNX, OS9 and freeBSD  --  http://caamora com au/operating system
==== === appropriate solution in an inappropriate world === ====


More information about the BUGS mailing list