Convert UTCDateTime to Carbon dates in query builder results

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • laravel-5.0.0
    • Affects Version/s: None
    • Component/s: Laravel
    • None
    • PHP Drivers
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      After PHPORM-230 (convert DateTimeInterface to UTCDateTime in queries), it seems that we should do the opposite operation to support more Laravel features out of the box.

      Laravel does not convert date string in query results, but this string can be forwarded to the Carbon date constructor.

      https://github.com/laravel/framework/blob/d16ce251beb53f46d602f5f523ba82900ae4be91/src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php#L149-L150

      UTCDateTime objects are not supported by Carbon.

      https://github.com/mongodb/laravel-mongodb/pull/3105#issuecomment-2302221218 

              Assignee:
              Jérôme Tamarelle
              Reporter:
              Jérôme Tamarelle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: