aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/View/Web.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/FixMyStreet/App/View/Web.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/FixMyStreet/App/View/Web.pm')
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm
index 42878be37..febeaf3c1 100644
--- a/perllib/FixMyStreet/App/View/Web.pm
+++ b/perllib/FixMyStreet/App/View/Web.pm
@@ -18,7 +18,7 @@ __PACKAGE__->config(
ENCODING => 'utf8',
render_die => 1,
expose_methods => [
- 'loc', 'nget', 'tprintf', 'display_crosssell_advert', 'prettify_epoch',
+ 'loc', 'nget', 'tprintf', 'display_crosssell_advert', 'prettify_dt',
'add_links', 'version',
],
FILTERS => {
@@ -92,20 +92,20 @@ sub display_crosssell_advert {
return CrossSell::display_advert( $c, $email, $name, %data );
}
-=head2 Utils::prettify_epoch
+=head2 Utils::prettify_dt
- [% pretty = prettify_epoch( $epoch, $short_bool ) %]
+ [% pretty = prettify_dt( $dt, $short_bool ) %]
-Return a pretty version of the epoch.
+Return a pretty version of the DateTime object.
$short_bool = 1; # 16:02, 29 Mar 2011
$short_bool = 0; # 16:02, Tuesday 29 March 2011
=cut
-sub prettify_epoch {
+sub prettify_dt {
my ( $self, $c, $epoch, $short_bool ) = @_;
- return Utils::prettify_epoch( $epoch, $short_bool );
+ return Utils::prettify_dt( $epoch, $short_bool );
}
=head2 add_links