alphagov/spotlight — pull request #631 by annapowellsmith (2014-07-07 12:05:36+00:00)
Title: Show local time in realtime module on hover

Backdrop now returns all datetimes in UTC. This caused a bug in the
realtime module as follows. If you were looking at the module at 11am
BST and you moused over the last data point, the label read "users at
9.57am, 3 minutes ago". This is because we were also displaying
dates in UTC.

So: amend the realtime module to use our date formatter, and amend
the date formatter to display all dates in local time. Use Moment's
http://momentjs.com/docs/#/displaying/calendar-time/ calendar time
formatter to prettify the time we display.

Ideally all our date strings should use our date formatters, though
this is not currently the case. In particular, the availability
module should use the 'dateRange' formatter, which should also
be amended to display local time. There is a larger piece of work
to review our use of formatters across Spotlight.

Story for this PR: https://www.pivotaltracker.com/s/projects/911874/stories/68621740