Timezone support in server side javascript

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: JavaScript
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      According to the docs, dates should be stored as UTC in mongodb. (At least pymongo suggests that and implicitly converts timezone aware datetimes to UTC.)

      However, in order to be able to group by days in a local timezone, some way to convert the Date() to a specific timezone in serverside javascript should be provided.

      E.g. a grouping function like...
      -------------------- 8< --------------------
      function(d) {
      return

      { 'date': new Date( d.uploadDate.getFullYear(), d.uploadDate.getMonth(), d.uploadDate.getDate()) }

      ;
      };
      -------------------- 8< --------------------
      ... won't work, if the timestamps are saved in UTC but grouping should be done by local days.

            Assignee:
            Unassigned
            Reporter:
            Leo Bergolth
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: