theCrag/website — Issue #404: date timezone problems
Author: scd
Created: 2011-11-24 23:12:56+00:00
State: open

The two perl thid party libraries assume different default time zone (one local the other GMT).
my $date = Date::Parse::str2time($dateStr);
my $newFormatDateStr = Date::Format::time2str("%a %o %b %Y",$date);

so the above conversion means that the date is wrong. Using these two functions for date string conversions should be used as follows:

my $date = Date::Parse::str2time($dateStr,'GMT');
my $newFormatDateStr = Date::Format::time2str("%a %o %b %Y",$date,'GMT');

This has been fixed in accountSidePanel (which was producing wrong dates in the account page). See Luke Peterson's facebook post:
http://www.facebook.com/permalink.php?story_fbid=10150474130962604&id=30155807603

I have also searched for other instances in the templates:
minor/formatDate
minor/tick

I'm going to log this issue for our records, but close it straight away.