Source for file DateTime53.php
Documentation is available at DateTime53.php
6: * @copyright Copyright (c) 2004, 2010 David Grudl
7: * @license http://nettephp.com/license Nette license
8: * @link http://nettephp.com
18: * DateTime with serialization and timestamp support for PHP 5.2.
20: * @copyright Copyright (c) 2004, 2010 David Grudl
28: $this->fix =
array($this->format('Y-m-d H:i:s'), $this->getTimezone()->getName());
36: $this->__construct($this->fix[0], new DateTimeZone($this->fix[1]));
44: return (int)
$this->format('U');
51: return $this->__construct(date('Y-m-d H:i:s', $timestamp), new DateTimeZone($this->getTimezone()->getName())); // getTimeZone() crashes in PHP 5.2.6