uzh/marugoto

Timestamps

Closed this issue · 7 comments

@interrogator

  • Change the time stamp settings in "Your games". This is because when I exited a game halfway through just now, "Open Games" recorded my unfinished game as being played on 7 December, not 7 November!

  • For the time stamp in the Notebook, can we set it to Central European Time? At the moment it's on Greenwich Mean Time. Not a major problem if it's a lot of work, though.

Originally posted by @martindusinberre in #90 (comment)

lol, I think the problematic code is:

  data: function() {
    return {
      months: ['January', 'February', 'March', 'April', 'May', 'June',
      'July', 'August', ' September', 'October', 'December'],
    };
  },

The other fix is going to be harder: frontend is apparently receiving UTC time for createdAt, which is good because that way localisation can be handled in the frontend (i.e. different times displayed for different users in different locations). However the frontend is not set up to convert times from UTC to local, and this will take some doing.

@interrogator OK, not a priority for the demo if it's terribly time consuming.

We are trying to do it now

These are both done, with added bonuses:

  • Get correct time Your games, rather than just date
  • Get day of the week something was done on
  • Get localisation: people in other timezones will have their local time displayed.

Note that there may be other datelike things that need converting. @martindusinberre please let me know if you discover them, and we can apply this fix.