Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20031111160944.68534.qmail@web21403.mail.yahoo.com> Date: Tue, 11 Nov 2003 08:09:44 -0800 (PST) From: Rick Rankin Subject: Re: perl localtime returns gmttime To: cygwin AT cygwin DOT com In-Reply-To: <20031111152301.47339.qmail@web21403.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii --- Rick Rankin wrote: > > --- "Gerrit P. Haase" wrote: > > Hello Kirill, > > > > Sunday, November 9, 2003, 6:29:09 PM, you wrote: > > > > > I have update perl to 5.8.2 . > > > After that i did find symptomatic insane behaviour of "local" function. > > > Now it returns GMT time. > > > Does anybody unite with me ? > > > > Yes, it is wrong here too. > > > > > -------------------------------------------------------------------- > > > $perl -e 'use POSIX qw(strftime); $now_string = strftime ("%a %b %e > > > %H:%M:%S %Y", localtime); print $now_string . "\n";' > > > Sun Nov 9 15:06:30 2003 > > > > > $ date -R > > > Sun, 09 Nov 2003 17:06:33 +0200 > > > -------------------------------------------------------------------- > > > > Can someone with perl 5.8.2 on Linux / perl 5.8.2 on Windows (AS & MinGW) > > try if it is wrong there too, please? > > > > ActiveState 5.8.0 (which is the latest they offer as far as I can tell) is > correct: > > $ /tools/perl/bin/perl -e use POSIX qw(strftime); $now_string = strftime("%a > %b\ > %e %H:%M:%S %Y", localtime); print $now_string . "\n"; > Tue Nov 08:17:04 2003 > > $ date -R > Tue, 11 Nov 2003 08:17:29 -0700 > Hmmm, it seems AS perl doesn't support %e in strftime. Here is the output again using %d: $ /tools/perl/bin/perl -e 'use POSIX qw(strftime); $now_string = strftime("%a %b %d %H:%M:%S %Y", localtime); print $now_string . "\n";' Tue Nov 11 09:07:54 2003 $ date -R Tue, 11 Nov 2003 09:08:14 -0700 --Rick -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/