Revision 1059
Added by aldus over 15 years ago
trunk/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
|
13 | 13 |
------------------------------------- 2.8.0 ------------------------------------- |
14 |
13-July 2009 Dietrich Roland Pehlke |
|
15 |
! Change inside "date_formats.php" and "time_formats.php" mktime() within time() |
|
16 |
to avoid warnings and strict messages. See #741. Minor cosmetic changes. |
|
14 | 17 |
13-July-2009 Ruud Eisinga |
15 | 18 |
# admin / media / browse reported an error in E_STRICT mode. |
16 | 19 |
13-July 2009 Dietrich Roland Pehlke |
trunk/wb/admin/interface/time_formats.php | ||
---|---|---|
32 | 32 |
*/ |
33 | 33 |
|
34 | 34 |
if(!defined('WB_URL')) { |
35 |
header('Location: ../index.php'); |
|
35 |
header('Location: ../../../index.php');
|
|
36 | 36 |
exit(0); |
37 | 37 |
} |
38 | 38 |
|
... | ... | |
45 | 45 |
$TIME_FORMATS = array(); |
46 | 46 |
|
47 | 47 |
// Get the current time (in the users timezone if required) |
48 |
if(isset($user_time) AND $user_time == true) { |
|
49 |
$mktime = mktime()+TIMEZONE; |
|
50 |
} else { |
|
51 |
$mktime = mktime()+DEFAULT_TIMEZONE; |
|
52 |
} |
|
48 |
$actual_time = time()+ ((isset($user_time) AND $user_time == true) ? TIMEZONE : DEFAULT_TIMEZONE); |
|
53 | 49 |
|
54 | 50 |
// Add values to list |
55 |
$TIME_FORMATS['g:i|A'] = gmdate('g:i A', $mktime);
|
|
56 |
$TIME_FORMATS['g:i|a'] = gmdate('g:i a', $mktime);
|
|
57 |
$TIME_FORMATS['H:i:s'] = gmdate('H:i:s', $mktime);
|
|
58 |
$TIME_FORMATS['H:i'] = gmdate('H:i', $mktime);
|
|
51 |
$TIME_FORMATS['g:i|A'] = gmdate('g:i A', $actual_time);
|
|
52 |
$TIME_FORMATS['g:i|a'] = gmdate('g:i a', $actual_time);
|
|
53 |
$TIME_FORMATS['H:i:s'] = gmdate('H:i:s', $actual_time);
|
|
54 |
$TIME_FORMATS['H:i'] = gmdate('H:i', $actual_time);
|
|
59 | 55 |
|
60 | 56 |
// Add "System Default" to list (if we need to) |
61 | 57 |
if(isset($user_time) AND $user_time == true) { |
62 | 58 |
if(isset($TEXT['SYSTEM_DEFAULT'])) { |
63 |
$TIME_FORMATS['system_default'] = gmdate(DEFAULT_TIME_FORMAT, $mktime).' ('.$TEXT['SYSTEM_DEFAULT'].')';
|
|
59 |
$TIME_FORMATS['system_default'] = gmdate(DEFAULT_TIME_FORMAT, $actual_time).' ('.$TEXT['SYSTEM_DEFAULT'].')';
|
|
64 | 60 |
} else { |
65 |
$TIME_FORMATS['system_default'] = gmdate(DEFAULT_TIME_FORMAT, $mktime).' (System Default)';
|
|
61 |
$TIME_FORMATS['system_default'] = gmdate(DEFAULT_TIME_FORMAT, $actual_time).' (System Default)';
|
|
66 | 62 |
} |
67 | 63 |
} |
68 | 64 |
|
trunk/wb/admin/interface/date_formats.php | ||
---|---|---|
32 | 32 |
*/ |
33 | 33 |
|
34 | 34 |
if(!defined('WB_URL')) { |
35 |
header('Location: ../index.php'); |
|
35 |
header('Location: ../../../index.php');
|
|
36 | 36 |
exit(0); |
37 | 37 |
} |
38 | 38 |
|
... | ... | |
45 | 45 |
$DATE_FORMATS = array(); |
46 | 46 |
|
47 | 47 |
// Get the current time (in the users timezone if required) |
48 |
if(isset($user_time) AND $user_time == true) { |
|
49 |
$mktime = mktime()+TIMEZONE; |
|
50 |
} else { |
|
51 |
$mktime = mktime()+DEFAULT_TIMEZONE; |
|
52 |
} |
|
48 |
$actual_time = time()+ ((isset($user_time) AND $user_time == true) ? TIMEZONE : DEFAULT_TIMEZONE); |
|
53 | 49 |
|
54 | 50 |
// Add values to list |
55 |
$DATE_FORMATS['l,|jS|F,|Y'] = gmdate('l, jS F, Y', $mktime);
|
|
56 |
$DATE_FORMATS['jS|F,|Y'] = gmdate('jS F, Y', $mktime);
|
|
57 |
$DATE_FORMATS['d|M|Y'] = gmdate('d M Y', $mktime);
|
|
58 |
$DATE_FORMATS['M|d|Y'] = gmdate('M d Y', $mktime);
|
|
59 |
$DATE_FORMATS['D|M|d,|Y'] = gmdate('D M d, Y', $mktime);
|
|
60 |
$DATE_FORMATS['d-m-Y'] = gmdate('d-m-Y', $mktime).' (D-M-Y)';
|
|
61 |
$DATE_FORMATS['m-d-Y'] = gmdate('m-d-Y', $mktime).' (M-D-Y)';
|
|
62 |
$DATE_FORMATS['d.m.Y'] = gmdate('d.m.Y', $mktime).' (D.M.Y)';
|
|
63 |
$DATE_FORMATS['m.d.Y'] = gmdate('m.d.Y', $mktime).' (M.D.Y)';
|
|
64 |
$DATE_FORMATS['d/m/Y'] = gmdate('d/m/Y', $mktime).' (D/M/Y)';
|
|
65 |
$DATE_FORMATS['m/d/Y'] = gmdate('m/d/Y', $mktime).' (M/D/Y)';
|
|
51 |
$DATE_FORMATS['l,|jS|F,|Y'] = gmdate('l, jS F, Y', $actual_time);
|
|
52 |
$DATE_FORMATS['jS|F,|Y'] = gmdate('jS F, Y', $actual_time);
|
|
53 |
$DATE_FORMATS['d|M|Y'] = gmdate('d M Y', $actual_time);
|
|
54 |
$DATE_FORMATS['M|d|Y'] = gmdate('M d Y', $actual_time);
|
|
55 |
$DATE_FORMATS['D|M|d,|Y'] = gmdate('D M d, Y', $actual_time);
|
|
56 |
$DATE_FORMATS['d-m-Y'] = gmdate('d-m-Y', $actual_time).' (D-M-Y)';
|
|
57 |
$DATE_FORMATS['m-d-Y'] = gmdate('m-d-Y', $actual_time).' (M-D-Y)';
|
|
58 |
$DATE_FORMATS['d.m.Y'] = gmdate('d.m.Y', $actual_time).' (D.M.Y)';
|
|
59 |
$DATE_FORMATS['m.d.Y'] = gmdate('m.d.Y', $actual_time).' (M.D.Y)';
|
|
60 |
$DATE_FORMATS['d/m/Y'] = gmdate('d/m/Y', $actual_time).' (D/M/Y)';
|
|
61 |
$DATE_FORMATS['m/d/Y'] = gmdate('m/d/Y', $actual_time).' (M/D/Y)';
|
|
66 | 62 |
|
67 | 63 |
// Add "System Default" to list (if we need to) |
68 | 64 |
if(isset($user_time) AND $user_time == true) { |
69 | 65 |
if(isset($TEXT['SYSTEM_DEFAULT'])) { |
70 |
$DATE_FORMATS['system_default'] = gmdate(DEFAULT_DATE_FORMAT, $mktime).' ('.$TEXT['SYSTEM_DEFAULT'].')';
|
|
66 |
$DATE_FORMATS['system_default'] = gmdate(DEFAULT_DATE_FORMAT, $actual_time).' ('.$TEXT['SYSTEM_DEFAULT'].')';
|
|
71 | 67 |
} else { |
72 |
$DATE_FORMATS['system_default'] = gmdate(DEFAULT_DATE_FORMAT, $mktime).' (System Default)';
|
|
68 |
$DATE_FORMATS['system_default'] = gmdate(DEFAULT_DATE_FORMAT, $actual_time).' (System Default)';
|
|
73 | 69 |
} |
74 | 70 |
} |
75 | 71 |
|
Also available in: Unified diff
Change inside "date_formats.php" and "time_formats.php" mktime() within time(), Minor cosmetic changes.