📁 File Manager Pro
v10.0.3 | PHP: 7.4.33
Server: LiteSpeed
2026-07-12 06:49:29
📂
/ (Root)
/
opt
/
alt
/
tests
/
alt-php84-pecl-mongodb_1.20.0-2.el8
/
tests
📍 /opt/alt/tests/alt-php84-pecl-mongodb_1.20.0-2.el8/tests
🔄 Refresh
✏️
Editing: bson-utcdatetime-todatetimeimmutable-003.phpt
Read Only
--TEST-- MongoDB\BSON\UTCDateTime::toDateTimeImmutable() with dates before the Unix epoch --INI-- date.timezone=UTC --FILE-- <?php $dates = [ '1960-01-01 12:12:12.1', '1969-12-31 23:59:59.999', ]; foreach ($dates as $date) { $dateTime = new \DateTimeImmutable($date); echo $dateTime->format(DateTimeInterface::RFC3339_EXTENDED), PHP_EOL; $utcDateTime = new MongoDB\BSON\UTCDateTime($dateTime); $newDate = $utcDateTime->toDateTimeImmutable(); echo $newDate->format(DateTimeInterface::RFC3339_EXTENDED), PHP_EOL, PHP_EOL; } ?> ===DONE=== <?php exit(0); ?> --EXPECT-- 1960-01-01T12:12:12.100+00:00 1960-01-01T12:12:12.100+00:00 1969-12-31T23:59:59.999+00:00 1969-12-31T23:59:59.999+00:00 ===DONE===
💾 Save Changes
❌ Cancel