SPUG: Portable way to get local time zone
Richard Anderson
Richard.Anderson at raycosoft.com
Wed Mar 21 20:06:06 CST 2001
No - please read my previous email:
----- Original Message -----
From: "Richard Anderson" <Richard.Anderson at raycosoft.com>
To: "starfire" <starfire at zipcon.net>; "Darren/Torin/Who Ever..." <torin at daft.com>
Cc: <spug-list at pm.org>
Sent: Tuesday, March 20, 2001 1:26 AM
Subject: Re: SPUG: Portable way to get local time zone
> Looking at the difference between localtime() and gmtime() will tell me the offset between local time and GMT, but it won't tell me what time zone I am in. For example, in the summer in Phoenix the offset is the same as the offset in L.A., but in the winter the Phoenix offset is the same as the Denver offset. So if the offset is seven hours, how do I know if I am in Denver, Phoenix or L.A?
>
Phoenix is in neither PST nor MST - it is in its own special time zone. Other areas of the world (e.g. southern Indiana) are just as weird.
Richard Anderson, Ph.D. www.unixscripts.com
Perl / Java / Oracle / Unix Richard.Anderson at raycosoft.com
Raycosoft, LLC Seattle, WA, USA
----- Original Message -----
From: "Lynn A Wilkins" <law at isomedia.com>
To: "starfire" <starfire at zipcon.net>; <spug-list at pm.org>; <slug-board at seaslug.org>
Sent: Wednesday, March 21, 2001 9:19 AM
Subject: Re: SPUG: Portable way to get local time zone
> Isn't the defference between localtime() and gmtime() the your timezone? (In
> hours.)
> -law
>
>
> On Mon,
> 19 Mar 2001, starfire wrote: > What is a portable way to get the local timezone
> from within a mod_perl > module? I see that on Linux 2.2.16 I can do "ls -l
> /etc/localtime" and on > Solaris 2.7 I can do "tail -1 /etc/TIMEZONE", but I
> want something that is > portable.
> >
> > The $TZ variable does not seem to be set in my mod_perl program's
> > environment ...
> >
> > --
> > Richard.Anderson at raycosoft.com www.unixscripts.com
> > Perl/Java/Oracle/Unix consulting Seattle, WA, USA
> >
> >
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> > Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
> > Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
> > For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
> > Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
> Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
> For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
> Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
>
>
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
More information about the spug-list
mailing list