From: moodler Date: Wed, 25 Aug 2004 08:52:14 +0000 (+0000) Subject: Merged changes from STABLE for timezone display X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=601131c169058071300ba4af7031eaab88241003;p=moodle.git Merged changes from STABLE for timezone display --- diff --git a/admin/config.html b/admin/config.html index 0e3290a29c..dbe4db4aac 100644 --- a/admin/config.html +++ b/admin/config.html @@ -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)"; } } diff --git a/admin/timezone.php b/admin/timezone.php index 0821d18f62..17d4bfcdc7 100644 --- a/admin/timezone.php +++ b/admin/timezone.php @@ -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)"; } } diff --git a/lang/en/moodle.php b/lang/en/moodle.php index ad5bfc49e8..d6db2d19d9 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -904,6 +904,7 @@ $string['strftimemonthyear'] = '%%B %%Y'; $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'; diff --git a/user/edit.html b/user/edit.html index 2b2f5c8af9..13dd673f13 100644 --- a/user/edit.html +++ b/user/edit.html @@ -164,16 +164,17 @@ if (isadmin()) { $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)"; } }