This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: time.altzone does not include DST offset on Cygwin
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: chrfranke, georg.brandl
Priority: normal Keywords: patch

Created on 2006-05-17 12:48 by chrfranke, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-altzone-patch.txt chrfranke, 2006-05-17 12:48 Proposed fix for timemodule.c:inittimezone()
Messages (2)
msg50270 - (view) Author: Christian Franke (chrfranke) Date: 2006-05-17 12:48
On Cygwin (python-2.4.1-1) time.altzone is always set
equal to time.timezone.

Steps to reproduce:
$ python -c 'import time; time.tzset(); \
  print time.ctime(), time.daylight, \
  time.timezone, time.altzone'

Actual result (for CEST):
Sun May 14 13:46:55 2006 1 -3600 -3600

Expected result:
Sun May 14 13:46:55 2006 1 -3600 -7200

This causes failure of time conversions in e.g.
rdiff-backup-1.1.5

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.
msg50271 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-05-17 14:27
Logged In: YES 
user_id=849994

Accepted in rev. 46026.
History
Date User Action Args
2022-04-11 14:56:17adminsetgithub: 43371
2006-05-17 12:48:18chrfrankecreate