[rescue] Timezone
rescue at sunhelp.org
rescue at sunhelp.org
Wed Dec 26 02:39:43 CST 2001
yeah I found that one in my Google search. Not clean or efficient at all.
The shell variable trick would be so much better if I could figure out
what I'm missing and get it to work. :)
===============================
Ed Mitchell (ed<-at->the7thbeer.com)
Finger for PGP public key
===============================
This boxen's uptime stats....
12:38am up 38 day(s), 12:51, 2 users, load average: 0.04, 0.04, 0.04
Those who would give up essential liberty to
purchase a little temporary safety deserve
neither liberty nor safety -- Benjamin Franklin
On Tue, 25 Dec 2001, Steve Sandau wrote:
> I've seen an answer to this on the Internet before. The link here isn't
> the method I've seen before, but it would appear to work. :)
>
> http://unix.about.com/library/weekly/aa070901e.htm
>
> ed at the7thbeer.com wrote:
> >
> > Question --
> >
> > In bourne shell, 'tis written that one may do:
> >
> > $ TZ="TZ+24"
> > $ export TZ
> > $ date
> > and the output of date will be the previous day. My output is the day
> > before + 8 hours. I presume this is because my TZ is Pacific. But adding
> > 24 + 8 for "TZ+32" yields today + 3 hours. *headscratch* Maybe I had too
> > much eggnog last night...
> >
> > First, anyone know the best way to get the previous day(and the day
> > before) out of a shell construct and second, why do you add 24 hours to
> > the timezone to get the *previous* day? My guess is that since timezones
> > increment towards the east, that subtracting, as in PST = GMT - 8hrs,
> > would get you to midnight of the same day and then back over the
> > international date line, which would be the following day. Is this even
> > close?
> >
> > Ah, the little puzzles my wife gives me for Christmas. :)
> >
> > ed
> > _______________________________________________
> > rescue maillist - rescue at sunhelp.org
> > http://www.sunhelp.org/mailman/listinfo/rescue
>
> --
> Steve Sandau
> ssandau at bath.tmac.com
> _______________________________________________
> rescue maillist - rescue at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/rescue
>
More information about the rescue
mailing list