[issue14902] test_logging failed

2012-07-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 56260d30985d by Vinay Sajip in branch 'default': Closes #14902: Fixed timezone conversion of a date/time in the past. Thanks to Yuriy Syrovetskiy for the report and Juancarlo Añez for the patch on which this fix is based. http://hg.python.org/cpyt

[issue14902] test_logging failed

2012-07-03 Thread Juancarlo Añez
Changes by Juancarlo Añez : -- type: compile error -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14902] test_logging failed

2012-07-03 Thread Juancarlo Añez
Juancarlo Añez added the comment: @Vinay No reason. datetime.astimezone(None) is documented in 3.3. You may even use: r.created = time.mktime(dt.astimezone().timetuple()) -- ___ Python tracker __

[issue14902] test_logging failed

2012-07-03 Thread Vinay Sajip
Vinay Sajip added the comment: Yes, thanks for doing the detailed analysis. I see that the original code was trying to adjust the timezone for a past time effectively using current timezone rules, which is why it doesn't work. Your patch appears equivalent to the slightly simpler dt = dateti

[issue14902] test_logging failed

2012-07-03 Thread Juancarlo Añez
Juancarlo Añez added the comment: I did extensive testing on time.timezone, and it is correct as far as the current date is concerned. The problem, as mentioned before, is that test_logging is using time.timezone for dates in the past for which the time zone may have been different from the c

[issue14902] test_logging failed

2012-07-03 Thread Vinay Sajip
Vinay Sajip added the comment: BTW I just noticed that you created this issue on 24 May. Sorry I only saw it today - in future, if you add logging issues, please add me to the nosy list, and that way I'll pick it up sooner. Usually one of the other committers adds me, but this time no-one did

[issue14902] test_logging failed

2012-07-03 Thread Vinay Sajip
Vinay Sajip added the comment: Sorry, I didn't quite grasp what the problem was before (timezones changing over time). I understand better now :-) @Yuriy: On my test machine (Ubuntu Jaunty), with Moscow set as my location, the value of time.timezone is -10800 (for Caracas, it's 16200). The d

[issue14902] test_logging failed

2012-07-03 Thread Juancarlo Añez
Juancarlo Añez added the comment: > And datetime.datetime.now().tzinfo is always None. I can reproduce that. -- ___ Python tracker ___ _

[issue14902] test_logging failed

2012-07-03 Thread Juancarlo Añez
Juancarlo Añez added the comment: @Vinay The test *is* broken in theory, because it uses today's time.timezone to make calculations over a datetime in the past (1993), even when official time zones have changes in recent years for Caracas, Moscow, and others: http://www.timeanddate.com/news/t

[issue14902] test_logging failed

2012-07-03 Thread Yuriy Syrovetskiy
Yuriy Syrovetskiy added the comment: And datetime.datetime.now().tzinfo is always None. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue14902] test_logging failed

2012-07-03 Thread Yuriy Syrovetskiy
Yuriy Syrovetskiy added the comment: @vinay.sajip My time.timezone is -14400. What is yours? -- ___ Python tracker ___ ___ Python-bug

[issue14902] test_logging failed

2012-07-03 Thread Vinay Sajip
Vinay Sajip added the comment: @Yuriy: I set my location to Moscow (using the Gnome date widget) and ran the test, but no failure occurs. vinay@eta-jaunty:~/projects/python/default$ date Tue Jul 3 15:12:39 MSD 2012 vinay@eta-jaunty:~/projects/python/default$ ./python Lib/test/regrtest.py tes

[issue14902] test_logging failed

2012-07-03 Thread Vinay Sajip
Changes by Vinay Sajip : -- assignee: -> vinay.sajip nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue14902] test_logging failed

2012-07-01 Thread Juancarlo Añez
Juancarlo Añez added the comment: My local timezone is (VET,VET) == time.tzname, and test_logging fails because time.timezone is off by 30 minutes. I couldn't find the cause for the problem with time.timezone, but logging is not to blame. I'm running the tests on Ubuntu 12.04 AMD64 which hand

[issue14902] test_logging failed

2012-05-24 Thread Yuriy Syrovetskiy
Yuriy Syrovetskiy added the comment: My local timezone is Europe/Moscow, UTC+4, no daylight saving since 2011. -- ___ Python tracker ___

[issue14902] test_logging failed

2012-05-24 Thread Yuriy Syrovetskiy
New submission from Yuriy Syrovetskiy : rev 152c78b94e41 test test_logging failed -- Traceback (most recent call last): File "/home/cblp/my/cpython_default/Lib/test/test_logging.py", line 2903, in test_time self.assertEqual(f.formatTime(r), '1993-04-21 08:03:00,123') AssertionError: '1993