Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7692

Export to Java and PHP uses ints for dates which is not ideal

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Export to Language
    • Labels:
      None

      From Charlie Little on slack: https://mongodb.slack.com/archives/C0U7K0MC3/p1709223625739079

      I'm exporting a find filter to Java that includes two dates.  The Java export offers this up:
      Bson filter = new Document("expiration_dt", new Document("$gte", new java.util.Date(1644105600000L)) .append("$lt", new java.util.Date(1644192000000L)));
       
      Can we change the Java export to use date strings or something more akin to the original ISODate format from the shell which was:

      { expiration_dt: \{ $gte: ISODate("2022-02-06"), $lt: ISODate("2022-02-07") }

      }
       
      Both PHP and Java use the long integer value for the date object, whereas all the other language exports use date from string or date from parts.

            Assignee:
            Unassigned Unassigned
            Reporter:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: