Annotation of embedaddon/php/ext/date/tests/bug52577.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #52577 (Incorrect date returning)
3: --FILE--
4: <?php
5: date_default_timezone_set('Europe/Kiev');
6: $date = '7.8.2010';
7: echo "String: ".$date."\n";
8: $date_format = DATE_RFC2822;
9: $unixtime = strtotime($date);
10: echo "Unixtime: ".$unixtime."\n";
11: echo "Date(PHP): ".date($date_format,$unixtime)."\n";
12: $date = new DateTime('@'.$unixtime);
13: echo "DateTime(PHP Class): ".$date->format($date_format);
14: ?>
15: --EXPECT--
16: String: 7.8.2010
17: Unixtime: 1281128400
18: Date(PHP): Sat, 07 Aug 2010 00:00:00 +0300
19: DateTime(PHP Class): Fri, 06 Aug 2010 21:00:00 +0000
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>