[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-16 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
status: pending - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-11 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Has it been reported?

Yes, in http://sourceware.org/bugzilla/show_bug.cgi?id=13401

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-11 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset bcd347cd6bf2 by Florent Xicluna in branch 'default':
Use unittest.skipUnless to skip the test related to the glibc bug, issue #13309.
http://hg.python.org/cpython/rev/bcd347cd6bf2

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-11 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

Thank you for the investigation, and the bug report to the glibc team.
I propose to close it as won't fix.

--
resolution:  - wont fix
stage: test needed - committed/rejected
status: open - pending

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-10 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

It is definitely a glibc issue. Here's a C snippet to reproduce:


#include time.h
#include stdlib.h

int main() {
time_t t;
struct tm tmp;
char str[200];

t = time(NULL);
tmp = *gmtime(t);
tmp.tm_gmtoff = 0;
tmp.tm_zone = NULL;

strftime(str, sizeof(str), %Z, tmp);
puts(str);

t = -2461446500;
localtime(t);

t = time(NULL);
tmp = *gmtime(t);
tmp.tm_gmtoff = 0;
tmp.tm_zone = NULL;

strftime(str, sizeof(str), %Z, tmp);
puts(str);

return 0;
}


Output:
CET
PMT


Calling localtime() or mktime() with a time largely in the past seems to 
corrupt the glibc's internal time structures (the char *tm_zone[]).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-10 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 05164831011e by Antoine Pitrou in branch 'default':
Avoid a glibc bug in test_time (issue #13309)
http://hg.python.org/cpython/rev/05164831011e

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-10 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Has it been reported?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-09 Thread Nadeem Vawda

Changes by Nadeem Vawda nadeem.va...@gmail.com:


--
nosy: +nadeem.vawda

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-07 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

LMT stands for Local Mean Time.

I found a report of someone having an issue parsing timezone with Python 2.6. 
Looks quite similar.
http://www.aczoom.com/forums/blockhosts/mar-10-151801-domains-blockhosts5599-error-failed-to-parse-date-for-ip-18911419951

--
components: +Library (Lib)

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-05 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

It's not just Gentoo. I get this error repeatably on Ubuntu Oneiric 64- bit and 
Linux Mint Katya 64-bit, though not on the 32-bit variants.

--
nosy: +vinay.sajip

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-05 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I also get this error on Mageia. If this can't be fixed, the test should be 
skipped or removed.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-05 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-03 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
priority: normal - deferred blocker

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Florent Xicluna

New submission from Florent Xicluna florent.xicl...@gmail.com:

After changeset 55a3b563f0db the Gentoo buildbot is complaining.


==
FAIL: test_strptime (test.test_time.TimeTestCase)
--
Traceback (most recent call last):
  File 
/home/buildbot/buildarea/3.x.ochtman-gentoo-amd64/build/Lib/test/test_time.py,
 line 159, in test_strptime
time.strptime(strf_output, format)
ValueError: time data 'LMT' does not match format '%Z'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
/home/buildbot/buildarea/3.x.ochtman-gentoo-amd64/build/Lib/test/test_time.py,
 line 162, in test_strptime
(format, strf_output))
AssertionError: conversion specifier '%Z' failed with 'LMT' input.

--

--
components: Tests
keywords: buildbot
messages: 146776
nosy: flox
priority: normal
severity: normal
stage: test needed
status: open
title: test_time fails: time data 'LMT' does not match format '%Z'
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 2771f7e96a52 by Florent Xicluna in branch 'default':
Add temporary tests to troubleshoot issue #13309 on Gentoo buildbot.
http://hg.python.org/cpython/rev/2771f7e96a52

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset bb0ae7df08f8 by Florent Xicluna in branch 'default':
Troubleshoot issue #13309 on Gentoo buildbot.
http://hg.python.org/cpython/rev/bb0ae7df08f8

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 5b1e1967ea9d by Florent Xicluna in branch 'default':
Replace temporary tests with the real test case for issue #13309 on Gentoo.
http://hg.python.org/cpython/rev/5b1e1967ea9d

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:


import time
import sys

t = time.gmtime(time.time())
s = time.strftime('%Z', t)
print(s)

time.mktime((-1, 1, 1, 0, 0, 0, -1, -1, -1))

t = time.gmtime(time.time())
s = time.strftime('%Z', t)
print(s)

outputs:
SAST
LMT

on my Gentoo box. I'm still figuring out why...

--
nosy: +rosslagerwall

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

It seems that mktime is buggy on Gentoo.
You can try to reset its state in some way before to retry strftime:


t = time.gmtime(time.time())
s = time.strftime('%Z', t)
print(s)

time.mktime((-1, 1, 1, 0, 0, 0, -1, -1, -1))
s = time.strftime('%Z', t)
print(s)

time.mktime((1, 1, 1, 0, 0, 0, 0, 0, -1))
s = time.strftime('%Z', t)
print(s)


I guess it could output:
SAST
LMT
SAST

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

It outputs:
SAST
LMT
LMT

An equivalent C program to the first test:

#include time.h
#include stdlib.h
#include stdio.h

int main() {

time_t t;
struct tm *tmp;

t = time(NULL);
tmp = localtime(t);

char str[200];
strftime(str, sizeof(str), %Z, tmp);

puts(str);

struct tm tmp2;
tmp2.tm_sec = 0;
tmp2.tm_min = 0;
tmp2.tm_hour = 0;
tmp2.tm_mday = 1;
tmp2.tm_mon = 1;
tmp2.tm_year = -1;
tmp2.tm_wday = -1;
tmp2.tm_yday = -1;
tmp2.tm_isdst = -1;
mktime(tmp2);

t = time(NULL);
tmp = localtime(t);

strftime(str, sizeof(str), %Z, tmp);

puts(str);

return 0;
}


Outputs (as expected):
SAST
SAST

Perhaps it's not mktime?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

See also issue #13313 on timezone, seen on x86 FreeBSD 7.2

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13309
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com