1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
--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)
|