DateTime object in 5.1

Having developed a project and getting ready to go live, I realise that, like an ass, I’ve been developing on 5.3 and the production machine is on 5.1.6.

I’ve been using the DateTime object quite a lot and it doesn’t work with 5.1.6. I don’t want to upgrade or recompile at this time, and I don’t really want to redevelop what I’ve done. Is there anywhere to download a class which will mimic 5.2+ behaviour? I can’t seem to find one?

Many thanks

I did a little reading and its possible to enable the [B]DateTime/B class within PHP 5.1 but its only experimental, you can read more about it here.

Thanks for the reply. I saw that but doesn’t it require a recompile?

PHP 5.1.6 is four and a half years old and, importantly, no longer supported by PHP. Is there anything, beyond not wanting to, preventing you from upgrading to the latest stable and supported version (5.3.5, soon 5.3.6)?