Phpr_DateTime is a class used to represent date and time values. Normally you won’t need to create instances of this class manually. Most model object fields are already instances of Phpr_DateTime class, for example the $created_at field of the User class. The class has methods for returning formatted date and time values as string.

The date/time values are stored in the database using GMT time zone. When a date/time value is fetched from the database, it converts it to the time zone specified in the TIMEZONE parameter specified in your config.php file.

Class methods


returns the value of the stored date and time as a string. The $string parameter specifies a date / time format. The format of the string can be any number of specifiers, these are loosely matched to the PHP strftime function.