Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4663

dateutil timezones do not work with DATETIME_CLAMP/DATETIME_AUTO

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.9
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      When initializing a MotorClient (or getting a DB from the client) with CodecOption and setting the tzinfo (together with tz_aware) this has no effect or even leads to an error. Without this option the user has to manually convert datetimes to his preferred timezone. This option works without any problems in the regular python mongo db driver.

      When setting the tzinfo arg on MotorClient, this raises an error because the tzinfo argument is mutable. Fair so far, because tzinfo is not a documented argument, but would be a nice option.

      When getting a database from the client (get_database, get_default_database) using CodeOptions as argument is documented, so here it is a real bug. There will be no error raised, but it will just get ignored (even worse than an error imho).

       

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            patrick.schoenthaler@itsc.de Patrick Schönthaler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: