aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Utils.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-25 12:45:09 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-25 15:51:19 +0000
commit09ac8e89c3caab877454ab66665410f82f90f945 (patch)
tree52ddf5e5838e397fbfa973843de2d7fc07320cdd /perllib/Utils.pm
parent221b5bd0e7715bd3f8f7d324bf97937edbf5c13d (diff)
Stop changing DateTimes to epochs and back.
Also revert cursor handling of Reports.pm; the DateTime inflation appears to be a slowdown, and we were doing that anyway, and this way makes things simpler in general. Will have a watch out for any performance issue, but hopefully it should be fine.
Diffstat (limited to 'perllib/Utils.pm')
-rw-r--r--perllib/Utils.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perllib/Utils.pm b/perllib/Utils.pm
index fa90620a0..1dd732283 100644
--- a/perllib/Utils.pm
+++ b/perllib/Utils.pm
@@ -221,12 +221,11 @@ sub cleanup_text {
return $input;
}
-sub prettify_epoch {
- my ( $epoch, $type ) = @_;
+sub prettify_dt {
+ my ( $dt, $type ) = @_;
$type ||= '';
$type = 'short' if $type eq '1';
- my $dt = DateTime->from_epoch( epoch => $epoch, time_zone => 'local' );
$dt->set_time_zone( FixMyStreet->config('TIME_ZONE') )
if FixMyStreet->config('TIME_ZONE');