PHP 8.2.0 Beta 3 available for testing

Introduction

The DateTimeImmutable and related classes allow you represent date/time information. The objects can be created by passing in a string presentation of date/time information, or from the current system's time.

A rich set of methods is supplied to modify and format this information as well, including handling timezones and DST transitions.

The date and time information is internally stored as a 64-bit number so all conceivably useful dates (including negative years) are supported. The range is from about 292 billion years in the past to the same in the future.

Note: The timezones referenced in this section can be found in the List of Supported Timezones.

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top