Convert UTCDateTime to Carbon dates in query builder results

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 5.0.0
    • Affects Version/s: None
    • None
    • 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: