delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/19/13:09:38

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Problem with localtime from Cygwin's perl
Date: Fri, 19 Mar 2004 10:09:50 -0800
Lines: 32
Message-ID: <c3fd05$s6n$1@sea.gmane.org>
References: <c3dp74$3is$1 AT sea DOT gmane DOT org> <20040319062612 DOT GB3156 AT efn DOT org>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: 12.9.207.201
User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207)
In-Reply-To: <20040319062612.GB3156@efn.org>

Yitzchak Scott-Thoennes wrote:

> On Thu, Mar 18, 2004 at 07:26:03PM -0800, Andrew DeFaria wrote:
>
>> I'm observing the following:
>>
>> C09-272-A:date
>> Thu Mar 18 19:22:53 PST 2004
>> C09-272-A:perl -e 'print scalar (localtime) . "\n"'
>> Fri Mar 19 03:22:58 2004
>> C09-272-A:ccperl -e 'print scalar (localtime) . "\n"'
>> Thu Mar 18 19:23:03 2004
>> C09-272-A:type -p perl
>> /bin/perl
>> C09-272-A:type -p ccperl
>> /dev/c/progra~1/rational/clearc~1/bin/ccperl
>> C09-272-A:uname -a
>> CYGWIN_NT-5.0 C09-272-A 1.5.7(0.109/3/2) 2004-01-30 19:32 i686 unknown
>> unknown Cygwin
>>
>> Notice that when using Cygwin's perl I get a GMT time but when using
>> ccperl (A perl from Rational Clearcase based off of ActiveState) I get a
>> proper PST time. My question is why and what can I do to fix it.
>
>
> This is a bug in localtime_r (seen by threaded perls under cygwin) that
> I think is fixed in 1.5.8.
>
> You can work around it by putting "use POSIX 'tzset'; tzset()" anywhere
> before the first call to localtime.

Thanks. That fixed 'er right up.


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019