Re: Python 2.4.1-1 time.altzone does not include DST offset

2006-05-19 Thread Jason Tishler
Christian,

On Thu, May 18, 2006 at 09:44:45PM +0200, Christian Franke wrote:
> Thanks for this quick release!

You are quite welcome.

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
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: Python 2.4.1-1 time.altzone does not include DST offset

2006-05-18 Thread Christian Franke

Jason,


[...]
  

Done.
http://sourceforge.net/tracker/index.php?func=detail&aid=1490224&group_id=5470&atid=305470



Since your patch was accepted, I have applied it to the Cygwin Python
2.4.3-1 package that I just released.
  


time.altzone is now OK and rdiff-backup [Maybe ITP] now works without 
workaround.


Thanks for this quick release!

Christian


--
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: Python 2.4.1-1 time.altzone does not include DST offset

2006-05-18 Thread Jason Tishler
Christian,

On Wed, May 17, 2006 at 02:56:08PM +0200, Christian Franke wrote:
> Jason Tishler wrote:
> > Sorry, but I'm timezone challenged.  So, I recommend submitting your
> > patch to http://sourceforge.net/tracker/?group_id=5470&atid=305470 for
> > consideration.
> 
> Done.
> http://sourceforge.net/tracker/index.php?func=detail&aid=1490224&group_id=5470&atid=305470

Since your patch was accepted, I have applied it to the Cygwin Python
2.4.3-1 package that I just released.

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
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: Python 2.4.1-1 time.altzone does not include DST offset

2006-05-17 Thread Christian Franke
Jason Tishler wrote:
> ...
>
> Sorry, but I'm timezone challenged.  So, I recommend submitting your
> patch to http://sourceforge.net/tracker/?group_id=5470&atid=305470 for
> consideration.

Done.
http://sourceforge.net/tracker/index.php?func=detail&aid=1490224&group_id=5470&atid=305470

Christian




--
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: Python 2.4.1-1 time.altzone does not include DST offset

2006-05-17 Thread Jason Tishler
Christian,

On Mon, May 15, 2006 at 08:39:26PM +0200, Christian Franke wrote:
> >Python's time.altzone is equal to time.timezone, it should be 
> >time.timezone-3600 (for CEST)
> >
> >$ python -c 'import time; time.tzset(); print time.ctime(), \
> > time.daylight, time.timezone, time.altzone, time.tzname'
> >Sun May 14 13:46:55 2006 1 -3600 -3600 ('   ', '   ')
> 
> On Cygwin, time.altzone is always set equal to time.timezone.
> 
> The attached patch should fix this for most timezones.

Sorry, but I'm timezone challenged.  So, I recommend submitting your
patch to http://sourceforge.net/tracker/?group_id=5470&atid=305470 for
consideration.

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

--
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: Python 2.4.1-1 time.altzone does not include DST offset

2006-05-15 Thread Christian Franke


Python's time.altzone is equal to time.timezone, it should be 
time.timezone-3600 (for CEST)


$ python -c 'import time; time.tzset(); print time.ctime(), \
 time.daylight, time.timezone, time.altzone, time.tzname'
Sun May 14 13:46:55 2006 1 -3600 -3600 ('   ', '   ')


On Cygwin, time.altzone is always set equal to time.timezone.

The attached patch should fix this for most timezones.
The function already uses the same heuristics in the !__CYGWIN__ &&
!HAVE_STRUCT_TM_TM_ZONE case.

Christian

diff -r -U 6 -p python-2.4.1-1.orig/Modules/timemodule.c 
python-2.4.1-1/Modules/timemodule.c
--- python-2.4.1-1.orig/Modules/timemodule.c2004-08-03 19:58:55.00100 
+0200
+++ python-2.4.1-1/Modules/timemodule.c 2006-05-15 16:53:55.171875000 +0200
@@ -697,13 +697,13 @@ void inittimezone(PyObject *m) {
}
 #else
 #endif /* HAVE_STRUCT_TM_TM_ZONE */
 #ifdef __CYGWIN__
tzset();
PyModule_AddIntConstant(m, "timezone", _timezone);
-   PyModule_AddIntConstant(m, "altzone", _timezone);
+   PyModule_AddIntConstant(m, "altzone", _timezone-3600);
PyModule_AddIntConstant(m, "daylight", _daylight);
PyModule_AddObject(m, "tzname",
   Py_BuildValue("(zz)", _tzname[0], _tzname[1]));
 #endif /* __CYGWIN__ */
 #endif /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
 }

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

Python 2.4.1-1 time.altzone does not include DST offset

2006-05-14 Thread Christian Franke
Python's time.altzone is equal to time.timezone, it should be 
time.timezone-3600 (for CEST)


$ python -c 'import time; time.tzset(); print time.ctime(), \
 time.daylight, time.timezone, time.altzone, time.tzname'
Sun May 14 13:46:55 2006 1 -3600 -3600 ('   ', '   ')

Possible side effect of the blank and equal tzname strings (caused by 
the timezone names returned by german XP) ?


Cygwin's runtime timezone offset looks good:

$ date '+%c %z "%Z"'
Sun May 14 13:46:55 2006 +0200 "   "

This possible python runtime bug causes bad time conversions in 
rdiff-backup-1.1.5 ([Maybe ITP] ;-)


Christian


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