Bugs item #601138, was opened at 2002-08-28 01:23
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=107940&aid=601138&group_id=7940

Category: MacPerl Application
Group: Release 5.6.1r*
Status: Open
Resolution: None
Priority: 5
Submitted By: Scott R. Godin (webdragon)
Assigned to: Nobody/Anonymous (nobody)
Summary: meaning of localtime/gmtime reversed?

Initial Comment:
simple script: 

#!/usr/bin/perl -l
print "$_ - $ENV{$_}" foreach keys %ENV;
use POSIX;

print POSIX::strftime("%H:%M:%S, %A, %B, %m %Y",
gmtime(0));

print POSIX::strftime("%H:%M:%S, %A, %B, %m %Y",
localtime(0));

under MacPerl I get what I expected to see (if I read
the documentation clearly enough) 

-=-
PERL5LIB - Primus 8.5GB:Applications:MacPerl ƒ:site_perl:
USER - Scott R. Godin
HOME - Primus 8.5GB:Applications:MacPerl ƒ:
MACPERL - Primus 8.5GB:Applications:MacPerl ƒ:
TMPDIR - Primus 8.5GB:Temporary Items:
04:00:00, Friday, January, 01 1904
00:00:00, Friday, January, 01 1904

-=-

under the redhat linux box I have (7.2 running Perl
5.6.1) I get the complete opposite: 

(apologies for all the env vars. wanted to be thorough) 
-=-

COLORTERM - gnome-terminal
DISPLAY - :0
LESS - CegMs
QTDIR - /usr/lib/qt-2.3.1
LS_COLORS -
no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:

XAUTHORITY - /home/webdragon/.Xauthority
TZ - America/New_York=
OSTYPE - linux
PWD - /home/webdragon
LESSOPEN - |/usr/bin/lesspipe.sh %s
XMODIFIERS - @im=none
BG - /usr/share/pixmaps/backgrounds/Propaganda/
PAGER - less
EDITOR - /usr/bin/vim
HOST - pcp01487823pcs
SSH_ASKPASS - /usr/libexec/openssh/gnome-ssh-askpass
EXINIT - set autoindent
MACHTYPE - i386
LOGNAME - webdragon
PATH -
/opt/Acrobat5/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/home/webdragon/bin:/usr/X11R6/bin

SHELL - /bin/tcsh
MAIL - /var/mail/webdragon
GROUP - users
_ - /usr/bin/gnome-terminal
SHLVL - 1
WINDOWID - 20971646
HOSTNAME - pcp01487823pcs
USER - webdragon
HOSTTYPE - i386-linux
HOME - /home/webdragon
SUPPORTED - en_US:en
BBMENU - /usr/local/share/blackbox/menu
TERM - xterm
WWW_HOME - http://www.google.com/
GREP_OPTIONS - -C1
LANG - en_US
VENDOR - intel
00:00:00, Thursday, January 01 1970
19:00:00, Wednesday, December 12 1969

-=-

The only way for me to get localtime on the unix box to
work like I've come to expect it to, is by setting 

local $ENV{TZ} = 'UTC'; in the script. 

-=-

My question is, who is wrong? MacPerl or this blasted
Unix box ? 

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=107940&aid=601138&group_id=7940

Reply via email to