Permalink
Browse files

Merged changes from STABLE for timezone display

  • Loading branch information...
1 parent d64bc8a commit 601131c169058071300ba4af7031eaab88241003 moodler committed Aug 25, 2004
Showing with 13 additions and 9 deletions.
  1. +4 −3 admin/config.html
  2. +4 −3 admin/timezone.php
  3. +1 −0 lang/en/moodle.php
  4. +4 −3 user/edit.html
View
@@ -50,16 +50,17 @@
$config->timezone = 99;
}
$timenow = time();
+ $timeformat = get_string('strftimedaytime');
for ($tz = -26; $tz <= 26; $tz++) {
$zone = (float)$tz/2.0;
$usertime = $timenow + ($tz * 1800);
if ($tz == 0) {
- $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT)";
+ $timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT)";
} else if ($tz < 0) {
- $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT$zone)";
+ $timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT$zone)";
} else {
- $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT+$zone)";
+ $timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT+$zone)";
}
}
View
@@ -33,16 +33,17 @@
$user->timezone = 99;
}
$timenow = time();
+ $timeformat = get_string('strftimedaytime');
for ($tz = -26; $tz <= 26; $tz++) {
$zone = (float)$tz/2.0;
$usertime = $timenow + ($tz * 1800);
if ($tz == 0) {
- $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT)";
+ $timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT)";
} else if ($tz < 0) {
- $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT$zone)";
+ $timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT$zone)";
} else {
- $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT+$zone)";
+ $timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT+$zone)";
}
}
View
@@ -904,6 +904,7 @@
$string['strftimerecent'] = '%%d %%b, %%H:%%M';
$string['strftimerecentfull'] = '%%a, %%d %%b %%Y, %%I:%%M %%p';
$string['strftimetime'] = '%%I:%%M %%p';
+$string['strftimedaytime'] = '%%a, %%H:%%M';
$string['stringsnotset'] = 'The following strings are not defined in $a';
$string['studentnotallowed'] = 'Sorry, but you can not enter this course as \'$a\'';
$string['students'] = 'Students';
View
@@ -164,16 +164,17 @@
$user->timezone = 99;
}
$timenow = time();
+ $timeformat = get_string('strftimedaytime');
for ($tz = -26; $tz <= 26; $tz++) {
$zone = (float)$tz/2.0;
$usertime = $timenow + ($tz * 1800);
if ($tz == 0) {
- $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT)";
+ $timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT)";
} else if ($tz < 0) {
- $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT$zone)";
+ $timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT$zone)";
} else {
- $timezones["$zone"] = gmstrftime("%a, %I:%M %p", $usertime)." (GMT+$zone)";
+ $timezones["$zone"] = gmstrftime($timeformat, $usertime)." (GMT+$zone)";
}
}

0 comments on commit 601131c

Please sign in to comment.