SPUG: Portable way to get local time zone

starfire starfire at zipcon.net
Mon Mar 19 19:14:08 CST 2001


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/





More information about the spug-list mailing list