Project

General

Profile

« Previous | Next » 

Revision 1059

Added by aldus almost 15 years ago

Change inside "date_formats.php" and "time_formats.php" mktime() within time(), Minor cosmetic changes.

View differences:

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

  

Also available in: Unified diff