mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
7b581f6d19
- MFH: Support "UTC" in strtotime() properly. - MFH: Added astro code, which is going to form the base for the new sunfuncs.
52 lines
1.2 KiB
PHP
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)
|