Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1460

Mongosh and new 2023 Egypt DST time

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.0
    • Affects Version/s: 1.9.1
    • Component/s: Shell API
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • Not Needed

      Problem Statement/Rationale

      Egypt changed their DST rules recently. Node.js is not still including the updated tzdata on version 18.x (the one currently used by mongosh):

      https://github.com/nodejs/node/issues/47818

       

      the issue then is that mongosh gives the incorrect date if using the Africa/Cairo timezone (as it's not updated for the new DST).

      Steps to Reproduce

      We used mongosh version 1.9.1

      • Set timezone to TZ=Africa/Cairo
      • Run the following commands

       

      [root@omserver ~]# mongosh-1.9.1-linux-x64/bin/mongosh
      Current Mongosh Log ID: 646f8dba9ed9fcd175a23569
      Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.9.1
      Using MongoDB: 6.0.5
      Using Mongosh: 1.9.1
      
      For mongosh info see: [https://docs.mongodb.com/mongodb-shell/]
      
      ------
      The server generated these startup warnings when booting
      2023-04-19T13:38:12.863+00:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
      ------
      
      Enterprise test> Date()
      Thu May 25 2023 18:33:01 GMT+0200 (Eastern European Standard Time)
      Enterprise test> exit
      [root@omserver ~]# date
      Thu May 25 19:33:13 EEST 2023
      
       

      Expected Results

      The date/time returned by mongosh should be the same as the OS one

      Actual Results

      Dates differ

      Additional Notes

            Assignee:
            Unassigned Unassigned
            Reporter:
            frederik.nosi@mongodb.com Frederik Nosi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: