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.
| 1. / 2. / ...
function cs_date($mode,$data,$show_time = 0, $show_date = 1) {
global $com_lang;
if($mode=='date' AND preg_match('=-=',$data)) {
$explode = explode('-', $data);
$data = mktime(0,0,1,$explode[1],$explode[2],$explode[0]);
}
else {
global $account;
$data = $data + $account['users_timezone'];
if(empty($account['users_dstime']) AND date('I',$data) != '0' OR $account['users_dstime'] == 'on') {
$data = $data + 3600;
}
}
$var = empty($show_date) ? '' : date($com_lang['dateset'],$data);
if(!empty($show_time)) {
$var .= empty($show_date) ? '' : ' ' . $com_lang['dtcon'] . ' ';
$var .= date($com_lang['timeset'],$data) . ' ' . $com_lang['timename'];
}
return $var;
}
function cs_datereal($mode,$time = 0) {
global $account;
$time = empty($time) ? cs_time() : $time;
$time = $time + $account['users_timezone'];
if(empty($account['users_dstime']) AND date('I',$time) != '0' OR $account['users_dstime'] == 'on') {
$time = $time + 3600;
}
return date($mode,$time);
} |