[Bug 1437534] [NEW] unstable mktime result
Filipe Dias
1437534 at bugs.launchpad.net
Sat Mar 28 00:54:36 UTC 2015
Public bug reported:
Hi all,
Mktime has different results when using dates that coincide with times
that "didn't" exist due to a change of the reference for the specific
timezone. In the examples I've run, when it's first called, it returns a
past (IMHO invalid) value. After it's called for another date, calling
it again for the first date, returns the expected result.
I found this happens on 1912-01-01 for Europe/Lisbon timezone and
1910-10-01 for Europe/Istanbul and it may be happening on other cases. I
also found a similar case where it doesn't happen, 1940-05-15 for
Europe/Amsterdam.
The tests I made are available here:
https://gist.github.com/fmfdias/5c7c36726ff3cce12ead
Running them:
gcc test_europe_lisbon_glibc.c -o test_europe_lisbon_glibc
TZ='Europe/Lisbon' ./test_europe_lisbon_glibc
gcc test_europe_istanbul_glibc.c -o test_europe_istanbul_glibc
TZ='Europe/Istanbul' ./test_europe_istanbul_glibc
gcc test_europe_amsterdam_glibc.c -o test_europe_amsterdam_glibc
TZ='Europe/Amsterdam' ./test_europe_amsterdam_glibc
Although I run these tests on Ubuntu 14.10, I saw this also happening on
a Ubuntu 12.04 machine.
lsb_release -rd
Description: Ubuntu 14.10
Release: 14.10
sudo apt-cache policy libc6
libc6:
Installed: 2.19-10ubuntu2.3
Candidate: 2.19-10ubuntu2.3
Version table:
*** 2.19-10ubuntu2.3 0
500 http://archive.ubuntu.com/ubuntu/ utopic-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ utopic-security/main amd64 Packages
100 /var/lib/dpkg/status
2.19-10ubuntu2 0
500 http://archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages
Thank you!
** Affects: glibc (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1437534
Title:
unstable mktime result
Status in glibc package in Ubuntu:
New
Bug description:
Hi all,
Mktime has different results when using dates that coincide with times
that "didn't" exist due to a change of the reference for the specific
timezone. In the examples I've run, when it's first called, it returns
a past (IMHO invalid) value. After it's called for another date,
calling it again for the first date, returns the expected result.
I found this happens on 1912-01-01 for Europe/Lisbon timezone and
1910-10-01 for Europe/Istanbul and it may be happening on other cases.
I also found a similar case where it doesn't happen, 1940-05-15 for
Europe/Amsterdam.
The tests I made are available here:
https://gist.github.com/fmfdias/5c7c36726ff3cce12ead
Running them:
gcc test_europe_lisbon_glibc.c -o test_europe_lisbon_glibc
TZ='Europe/Lisbon' ./test_europe_lisbon_glibc
gcc test_europe_istanbul_glibc.c -o test_europe_istanbul_glibc
TZ='Europe/Istanbul' ./test_europe_istanbul_glibc
gcc test_europe_amsterdam_glibc.c -o test_europe_amsterdam_glibc
TZ='Europe/Amsterdam' ./test_europe_amsterdam_glibc
Although I run these tests on Ubuntu 14.10, I saw this also happening
on a Ubuntu 12.04 machine.
lsb_release -rd
Description: Ubuntu 14.10
Release: 14.10
sudo apt-cache policy libc6
libc6:
Installed: 2.19-10ubuntu2.3
Candidate: 2.19-10ubuntu2.3
Version table:
*** 2.19-10ubuntu2.3 0
500 http://archive.ubuntu.com/ubuntu/ utopic-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ utopic-security/main amd64 Packages
100 /var/lib/dpkg/status
2.19-10ubuntu2 0
500 http://archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages
Thank you!
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1437534/+subscriptions
More information about the foundations-bugs
mailing list