From c9c36dba7d08e1db0ac3eff7e89cb4e1c619f5b2 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Sat, 2 Feb 2013 19:29:14 +0000 Subject: [PATCH] Fix date parsing (it should be a Time not Date object) --- views/candidate.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/candidate.haml b/views/candidate.haml index a0a3ccf..330b71b 100644 --- a/views/candidate.haml +++ b/views/candidate.haml @@ -22,7 +22,8 @@ %td{ :style => "background-color: #{ccy['party_colour']}" }   %td %a{ :href => "/bodies/#{ccy['body_slug']}/elections/#{ccy['d']}" } - = long_date(Date.parse(ccy['d'])) + - bits = ccy['d'].split("-") + = long_date(Time.mktime(bits[0], bits[1], bits[2])) %td= ccy['party_name'] %td %a{ :href => "/bodies/#{ccy['body_slug']}" }