Re: [PHP-DEV] Legal date generated from illegal date

2015-02-13 Thread Yasuo Ohgaki
Hi Lester, On Fri, Feb 13, 2015 at 6:52 PM, Lester Caine wrote: > Management of dates is controversial in a lot more areas than just using > the wrong calendar in prior times ;) > Each database uses it's own way to handle dates and time internally, and > most default actions are different, add t

Re: [PHP-DEV] Legal date generated from illegal date

2015-02-13 Thread Lester Caine
On 13/02/15 04:03, Yasuo Ohgaki wrote: > I see controversial behavior here, unserialize raises error while new > DateTime('-00-00') doesn't. > > If it's a bug, I'll just file it as a bug. Yasuo Management of dates is controversial in a lot more areas than just using the wrong calendar in prio

[PHP-DEV] Legal date generated from illegal date

2015-02-12 Thread Yasuo Ohgaki
Hi Derick, I came across with strange DataTime generates legal date from illegal date. http://3v4l.org/rKFIg format('Y-m-d H:i:s')); $date = new DateTime('-01-00'); var_dump($date->format('Y-m-d H:i:s')); $date = new DateTime('-00-01'); // "-0001-12-01 00:00:00" legal date from illegal da