Monday 30 June 2008 7:43:57 am
Hi Donat, The best way of dealing with the issue of dates falling outside of the traditionally supported range 1970 - 2038, is to use the new class DateTime, introduced in PHP 5.2.x. This allows you to operate on a much larger date range, as large as one would ever need presumably. As the DateTime object works with 64-bit values for the dates internally, this will increase the usable date range, even on a 32-bit system, additionally DateTime handles timezones. In the upcoming PHP 5.3 there will also be elegant, built-in support in the language for calculating date intervals between such DateTime objects. Will requiring PHP 5.3 when it becomes available, be a problem for you? As for utilising this new object inside eZ Publish, the best course of action would be to introduce a new datatype which uses DateTime natively. Using a new datatype for this, will allow existing sites to work, and sites could gradually be ported over from older datatypes. Given there is a conversion tool between the datatypes. As of now there isn't a decision to include such a new datatype in a specific version, but this is up for discussion, before the roadmaps for upcoming maintenance releases are set. The problem of the limited date range is something we are aware of, and would like to offer a remedy for.
--
Ole Marius Smestad
Lead Engineer eZ Publish
Member of the Community Project Board
|