From: <de...@de...> - 2012-11-30 06:47:04
|
Author: PeterThoeny Date: 2012-11-30 00:46:57 -0600 (Fri, 30 Nov 2012) New Revision: 24244 Trac url: http://develop.twiki.org/trac/changeset/24244 Modified: twiki/trunk/core/lib/TWiki/Time.pm Log: Item7068: Fix for incorrectly handled DST when in GMT timezone -- thanks TWiki:Main.TomCrane Modified: twiki/trunk/core/lib/TWiki/Time.pm =================================================================== --- twiki/trunk/core/lib/TWiki/Time.pm 2012-11-30 06:27:29 UTC (rev 24243) +++ twiki/trunk/core/lib/TWiki/Time.pm 2012-11-30 06:46:57 UTC (rev 24244) @@ -109,7 +109,12 @@ # Local time at midnight on the epoch gives us minus the # local difference. e.g. CST is GMT + 1, so midnight Jan 1 1970 CST # is -01:00Z - $tzadj = -Time::Local::timelocal(0, 0, 0, 1, 0, 70); + ## $tzadj = -Time::Local::timelocal(0, 0, 0, 1, 0, 70); + # Note: This does not work for GMT timezone itself, eg. under perl + # v5.8.8 built for x86_64-linux-thread-multi., + # Item7068: Proper handling of DST when in GMT timezone -- TWiki:Main/TomCrane + my @now = localtime(time); + $tzadj = Time::Local::timegm(@now) - Time::Local::timelocal(@now); } # try "31 Dec 2001 - 23:59" (TWiki date) |