Public bug reported:
Binary package hint: perl
The Time::Local::timelocal() function seems to be broken today after the
GMT -> BST daylight saving time change in the UK, e.g:
$ date
Sun Mar 25 18:28:21 BST 2007
$ perl -MTime::Local -e 'print scalar localtime( timelocal( localtime() ) ) .
"\n";'
Sun Mar 25 19:28:48 2007
Notice that going through timelocal() causes the hour to be offset by
one hour, the above operation should be a no-op and print out the
current local time (and indeed tomorrow it will work fine).
Another example:
use Time::Local;
@a = ( 0, 43, 5, 25, 2, 107 ); # 5:43am, 25th March 2007
$t = timelocal( @a ) ;
print scalar localtime( $t ), "\n"; # Prints 6:43am
@a = ( 0, 43, 5, 26, 2, 107 ); # 5:43am, 26th March 2007
$t = timelocal( @a ) ;
print scalar localtime( $t ), "\n"; # Prints 5:43am
This broken behaviour seems to be isolated to timezones that changed from GMT
(e.g. Europe/London, Europe/Dublin, Europe/Isle_of_Man all show the problem,
but Europe/Paris and Europe/Berlin don't).
I have reproduced this on both edgy and feisty. FWIW, Using Time::Local
version 1.07 works, but 1.10 doesn't (I don't have 1.08 or 1.09
available to test).
ProblemType: Bug
Architecture: i386
Date: Sun Mar 25 18:26:31 2007
DistroRelease: Ubuntu 7.04
Uname: Linux moonraker 2.6.20-12-generic #2 SMP Wed Mar 21 20:55:46 UTC 2007
i686 GNU/Linux
** Affects: perl (Ubuntu)
Importance: Undecided
Status: Unconfirmed
--
Time::Local::timelocal() is broken over GMT/BST change
https://launchpad.net/bugs/96018
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs