[pywin32-bugs] [ pywin32-Bugs-1392316 ] win32timezone.GetLocalTimeZone cannot find timezone
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2006-01-02 22:20:22
|
Bugs item #1392316, was opened at 2005-12-29 09:09 Message generated for change (Settings changed) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1392316&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pythonwin Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Radek Svarz (allitaice) Assigned to: Nobody/Anonymous (nobody) Summary: win32timezone.GetLocalTimeZone cannot find timezone Initial Comment: Realized on Python 2.4.2 pywin32 205 Winxp Pro Czech GetLocalTimeZone( ) uses StandardName in this key: SYSTEM\CurrentControlSet\Control\TimeZoneInformation this StandardName in the registry is a text string of the local translated name of the local time zone (eg. for the Czech Republic it is "Stredni Evropa (bezny cas)" However keys used in TimeZoneInfo.__init__: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\* are written in English (even on other than English Win XP installations) (eg. for the Czech Republic it is: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time) Therefore you cannot perform the lookup like this on non-English Winxp systems. Unfortunately there is no item in TimeZoneInformation key, that would state the English name of the time zone. FYI the item Std in Time Zones\Central Europe Standard Time states the same string as the item StandardName in TimeZoneInformation. You should perform lookup using that. Radek ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2006-01-03 09:20 Message: Logged In: YES user_id=14198 Fixed in a patch from Jason: Checking in win32timezone.py; new revision: 1.5; previous revision: 1.4 Will be in the next pywin32 build. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1392316&group_id=78018 |