php-src/ext/date/tests/mktime-2.phpt
Derick Rethans 7b581f6d19 - MFH: Merged new timelib, which is a bit more cleverer
- MFH: Support "UTC" in strtotime() properly.
- MFH: Added astro code, which is going to form the base for the new sunfuncs.
2005-12-19 13:00:37 +00:00

52 lines
1.2 KiB
PHP

--TEST--
mktime() [2]
--INI--
error_reporting=2047
--FILE--
<?php
$timezones = array(
'GMT0',
'Europe/London'
);
foreach($timezones as $timezone)
{
putenv('TZ='.$timezone);
/* status of daylight saving time unknown */
var_dump(mktime(0, 0, 0, 1, 1, 2002));
/* status of daylight saving time unknown */
var_dump(mktime(0, 0, 0, 1, 1, 2002, -1));
/* daylight saving time is not in effect */
var_dump(mktime(0, 0, 0, 1, 1, 2002, 0));
/* daylight saving time is in effect */
var_dump(mktime(0, 0, 0, 1, 1, 2002, 1));
/* status of daylight saving time unknown */
var_dump(mktime(0, 0, 0, 7, 1, 2002));
/* status of daylight saving time unknown */
var_dump(mktime(0, 0, 0, 7, 1, 2002, -1));
/* daylight saving time is not in effect */
var_dump(mktime(0, 0, 0, 7, 1, 2002, 0));
/* daylight saving time is in effect */
var_dump(mktime(0, 0, 0, 7, 1, 2002, 1));
}
?>
--EXPECTF--
int(1009843200)
int(1009843200)
int(1009843200)
int(%s)
int(1025481600)
int(1025481600)
int(1025481600)
int(%s)
int(1009843200)
int(1009843200)
int(1009843200)
int(1009839600)
int(1025478000)
int(1025478000)
int(1025481600)
int(1025478000)