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