Alexander Belopolsky <alexander.belopol...@gmail.com> added the comment:

Francesco,

You have my +1 for implementing both 1 and 2 below.
"""
1. Use timegm(3) function where HAVE_TIMEGM is defined (i have a working patch 
for it)

2. Implement a more portable timegm function with tzset and mktime where 
HAVE_MKTIME and 
HAVE_WORKING_TZSET is defined (i have a working patch for it)
"""

I don't think "3. Doing some calculation taking calendar.timegm as example" is 
a good idea.  IMHO, its is more important that timegm is a proper inverse of 
gmtime on any given platform than to have the same values produced by timegm 
across platforms.  If system timegm (or mktime) thinks that 1900 is a leap 
year, for example, python should not attempt to correct that.  Maybe doing 
"some calculation" on systems that don't have mktime is a reasonable last 
resort, but I am not sure it is worth the effort.

----------
nosy: +Alexander.Belopolsky

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6280>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to