diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-03-06 19:21:37 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-03-06 19:21:37 +0100 |
commit | b50bb4c26c7d50192916b432915c1bd1633a5a6f (patch) | |
tree | b3a3ae9d1ec23384b2a05d972a5ae69eccd80fb2 /extensions/MyDashboard/lib/TimeAgo.pm | |
parent | ead39090a962e87ad790cf93943ba5f242d11882 (diff) | |
download | bugzilla-b50bb4c26c7d50192916b432915c1bd1633a5a6f.tar.gz bugzilla-b50bb4c26c7d50192916b432915c1bd1633a5a6f.tar.xz |
Bug 848271 - 'Assigned to You' section says 'in the future' for bug last updated time
Diffstat (limited to 'extensions/MyDashboard/lib/TimeAgo.pm')
-rw-r--r-- | extensions/MyDashboard/lib/TimeAgo.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/extensions/MyDashboard/lib/TimeAgo.pm b/extensions/MyDashboard/lib/TimeAgo.pm index f213986d6..b870a292e 100644 --- a/extensions/MyDashboard/lib/TimeAgo.pm +++ b/extensions/MyDashboard/lib/TimeAgo.pm @@ -84,9 +84,8 @@ sub time_ago { croak('Invalid second parameter provided to DateTime::Duration::Fuzzy::time_ago; it must be a DateTime object if provided') } - # Use clones in UTC for safe date calculation - my $now_clone = $now->clone->set_time_zone('UTC'); - my $time_clone = $time->clone->set_time_zone('UTC'); + my $now_clone = $now->clone->set_time_zone(Bugzilla->user->timezone); + my $time_clone = $time->clone->set_time_zone(Bugzilla->user->timezone); my $dur = $now_clone->subtract_datetime_absolute( $time_clone )->in_units('seconds'); foreach my $range ( @ranges ) { |