delorie.com/archives/browse.cgi | search |
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 |
X-Originating-IP: | [66.167.206.172] |
X-Originating-Email: | [rkitover AT hotmail DOT com] |
X-Sender: | rkitover AT hotmail DOT com |
From: | "Rafael Kitover" <caelum AT debian DOT org> |
To: | <cygwin AT cygwin DOT com> |
Subject: | RE: localtime_r not returning local time |
Date: | Thu, 12 Feb 2004 13:10:03 -0800 |
MIME-Version: | 1.0 |
In-Reply-To: | <20040208184015.GB880@efn.org> |
Message-ID: | <BAY12-DAV65cuwGVLlR00032b73@hotmail.com> |
X-OriginalArrivalTime: | 12 Feb 2004 21:10:04.0562 (UTC) FILETIME=[95C0DF20:01C3F1AC] |
Would it be a lot of overhead to have something like tzset be called in the bootstrap code for launching Cygwin programs? Or maybe just have a DLL global default, based on windows time zone, and just allow processes to reset it for themselves (and any children.) -- Rafael >-----Original Message----- >From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of >Yitzchak Scott-Thoennes >Sent: Sunday, February 08, 2004 10:40 AM >To: cygwin AT cygwin DOT com >Subject: localtime_r not returning local time > >localtime_r is (if no direct or indirect call to tzset has been made) >returning UTC time. > >This is the source of the cygwin perl bug where perl's localtime() is >returning UTC time. See: >http://groups.google.com/groups?selm=rt-3.0.8-26136- >75339 DOT 11 DOT 8378531676315 AT perl DOT org > >Perl does not ever directly call tzset (except when perl code calls >POSIX::tzset). Should it do so (at least at startup), or should >localtime_r be returning a TZ-based time even when tzset hasn't been >called? > >My reading of susv3: > "Local timezone information is used as though localtime() calls tzset(). > > The relationship between a time in seconds since the Epoch used as > an argument to localtime() and the tm structure (defined in the > <time.h> header) is that the result shall be...corrected for timezone > and any seasonal time adjustments... > > The same relationship shall apply for localtime_r(). > ... > Unlike localtime(), the reentrant version is not required to set > tzname. > >is that while localtime_r need not (should not?) set the daylight, >timezone, and tzname globals, it should still use local time as if >tzset had been called. Admittedly, the standard is vague on this >point. > >-- >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/ -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |