Since php 5.1.0 there is possible to use the DateTime to handle dates, and in contrast with the older functions (strtotime etc..) it handles 64 bit times.
The following example:
$date =new DateTime("1 January 1365 - 30 min - 367 days");
$date->setTimezone( new DateTimezone('GMT') );
print $date->format("c");
results in:
1363-12-30T22:30:00+00:00
Version: unspecified
Severity: normal