Note: The Date API is designed to use the new PHP date and timezone functions that are available in PHP 5.2 and above. If you're using an earlier version of PHP, you'll need to enable the Date PHP4 module which provides some wrapper code to emulate those functions. The wrapper code is slower and less efficient than the native date functions, so if at all possible, you will want to run on a server that uses PHP 5.2 or higher for the best performance. Some distros, like Red Hat, use PHP 5.1 instead. See Installing PHP 5.2 on RedHat for ideas on how to update that.

PHP 4 substitutions for the PHP 5 date functions are supplied if the Date PHP4 module is enabled. Use the PHP 5 functions in your code as they would normally be used and the PHP 4 alternatives will be automatically be substituted in when needed.

You cannot do everything with these functions that can be done in PHP 5, but you can create dates, find timezone offsets, and format the results. Timezone handling uses native PHP 5 functions when available and degrades automatically for PHP 4 to use substitutions like those provided in previous versions of the Date and Event modules.

Read the doxygen documentation in this module for more information about using the functions in ways that will work in PHP 4.

The following functions are emulated in PHP4:

- date_create()
- date_date_set()
- date_format()
- date_offset_get()
- date_timezone_set()
- timezone_abbreviations_list()
- timezone_identifiers_list()
- timezone_offset_get()
- timezone_open()