Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-543

MongoDB\BSON\UTCDateTime on 32 bit platforms parse argument wrong

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 1.1.3
    • Affects Version/s: 1.1.2
    • Component/s: None
    • None
    • Environment:
      Windows server 2008
      IIS 7.5
      PHP 5.6 x86
      php_mongodb-1.1.2-5.6-nts-vc11-x86

      Hi

      I am unable to get it work, gives wrong date back!?

      $utcdatetime = new MongoDB\BSON\UTCDateTime(1416445411987);
      $datetime = $utcdatetime->toDateTime();
      var_dump($datetime->format(DATE_RSS));

      Should give

      string(31) "Thu, 20 Nov 2014 01:03:31 +0000"

      But gives

      string(31) "Sun, 21 Dec 1969 15:43:25 +0000"

      Ref: http://php.net/manual/en/mongodb-bson-utcdatetime.todatetime.php

            Assignee:
            Unassigned Unassigned
            Reporter:
            jesperbendtsen83@gmail.com Jesper Erik Bendtsen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: