Re: localtime_r not returning local time

2004-02-13 Thread Gerrit P. Haase
Yitzchak wrote:

 On Thu, Feb 12, 2004 at 01:10:03PM -0800, Rafael Kitover wrote:
 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.)

 Either would be better than nothing.  I'm very curious to know what
 various flavors of unix do.  As I said, my reading of susv3 is that TZ
 should be checked with every call to localtime_r().

If tzset() should be called in localtime_r() it is a bug in newlib and
should be included there.

Gerrit
-- 
=^..^= http://nyckelpiga.de/donate.html


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



Re: localtime_r not returning local time

2004-02-13 Thread Christopher Faylor
On Fri, Feb 13, 2004 at 12:40:12PM +0100, Gerrit P. Haase wrote:
Yitzchak wrote:
On Thu, Feb 12, 2004 at 01:10:03PM -0800, Rafael Kitover wrote:
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.)

Either would be better than nothing.  I'm very curious to know what
various flavors of unix do.  As I said, my reading of susv3 is that TZ
should be checked with every call to localtime_r().

If tzset() should be called in localtime_r() it is a bug in newlib and
should be included there.

localtime_r doesn't come from newlib.  It's a cygwin routine.

I checked in a fix a few days ago.

http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/localtime.cc.diff?cvsroot=srcr1=1.10r2=1.11

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



Re: localtime_r not returning local time

2004-02-13 Thread Brian . Kelly

YEA! - I need this fix since I use the localtime feature of perl and have
been stuck with 5.8.0 (and rolling back
to 5.6 required complete re-installation of all other CPAN modules) - which
had been removed from setup.

Anyhow THANK YOU!!!

( I know I should be a nice guy and test the snapshot - but unfortunately I
don't a suitible test environment available at the moment. )

( BURNING QUESTION  -  Are  *THANK YOU's*  from non-contributors  ...
off - topic??? )

Brian Kelly




Sent by:[EMAIL PROTECTED]


To:[EMAIL PROTECTED]
cc: (bcc: Brian Kelly/WTC1/Empire)

Subject:Re: localtime_r not returning local time


On Fri, Feb 13, 2004 at 12:40:12PM +0100, Gerrit P. Haase wrote:
Yitzchak wrote:
On Thu, Feb 12, 2004 at 01:10:03PM -0800, Rafael Kitover wrote:
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.)

Either would be better than nothing.  I'm very curious to know what
various flavors of unix do.  As I said, my reading of susv3 is that TZ
should be checked with every call to localtime_r().

If tzset() should be called in localtime_r() it is a bug in newlib and
should be included there.

localtime_r doesn't come from newlib.  It's a cygwin routine.

I checked in a fix a few days ago.

http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/localtime.cc.diff?cvsroot=srcr1=1.10r2=1.11


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







WellChoice, Inc. made the following
 annotations on 02/13/2004 10:14:45 AM
--
Attention!  This electronic message contains information that may be legally 
confidential and/or privileged.  The information is intended solely for the individual 
or entity named above and access by anyone else is unauthorized.  If you are not the 
intended recipient, any disclosure, copying, distribution, or use of the contents of 
this information is prohibited and may be unlawful.  If you have received this 
electronic transmission in error, please reply immediately to the sender that you have 
received the message in error, and delete it. Release/Disclosure Statement


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



Re: localtime_r not returning local time

2004-02-13 Thread Gerrit P. Haase
Christopher wrote:

 On Fri, Feb 13, 2004 at 12:40:12PM +0100, Gerrit P. Haase wrote:
Yitzchak wrote:
On Thu, Feb 12, 2004 at 01:10:03PM -0800, Rafael Kitover wrote:
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.)

Either would be better than nothing.  I'm very curious to know what
various flavors of unix do.  As I said, my reading of susv3 is that TZ
should be checked with every call to localtime_r().

If tzset() should be called in localtime_r() it is a bug in newlib and
should be included there.

 localtime_r doesn't come from newlib.  It's a cygwin routine.

 I checked in a fix a few days ago.

 http://sourceware.org/cgi-bin/cvsweb.cgi/src/winsup/cygwin/localtime.cc.diff?cvsroot=srcr1=1.10r2=1.11

This is great, many thanks.

Gerrit
-- 
=^..^= http://nyckelpiga.de/donate.html


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



Re: localtime_r not returning local time

2004-02-13 Thread Larry Hall
At 10:11 AM 2/13/2004, [EMAIL PROTECTED] you wrote:

YEA! - I need this fix since I use the localtime feature of perl and have
been stuck with 5.8.0 (and rolling back
to 5.6 required complete re-installation of all other CPAN modules) - which
had been removed from setup.

Anyhow THANK YOU!!!

( I know I should be a nice guy and test the snapshot - but unfortunately I
don't a suitible test environment available at the moment. )

( BURNING QUESTION  -  Are  *THANK YOU's*  from non-contributors  ...
off - topic??? )


If they are Cygwin-specific, they are on-topic for this list. ;-)


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746 


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



RE: localtime_r not returning local time

2004-02-12 Thread Rafael Kitover
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Yitzchak Scott-Thoennes
Sent: Sunday, February 08, 2004 10:40 AM
To: [EMAIL PROTECTED]
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-
[EMAIL PROTECTED]

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/



Re: localtime_r not returning local time

2004-02-12 Thread Yitzchak Scott-Thoennes
On Thu, Feb 12, 2004 at 01:10:03PM -0800, Rafael Kitover wrote:
 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.)

Either would be better than nothing.  I'm very curious to know what
various flavors of unix do.  As I said, my reading of susv3 is that TZ
should be checked with every call to localtime_r().

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