Now day-names are showed properly always. Bug 1422.

Using gmt functions to avoid TZ displacements...
(http://moodle.org/bugs/bug.php?op=show&bugid=1422)
And BUMP version.
This commit is contained in:
stronk7 2004-05-19 23:08:03 +00:00
parent 4b92953150
commit ba484b2108
2 changed files with 4 additions and 4 deletions

View File

@ -163,13 +163,13 @@
if (!isset($firstdayofweek) || $firstdayofweek != 1) {
$firstdayofweek = 0;
}
//Now create the timestamp of a well-know sunday (02/25/2001, my 31th birthday (stronk7) !!)
$onesunday = make_timestamp(2001,2,25);
//Now create the GMT timestamp of a well-know sunday (02/25/2001, my 31th birthday (stronk7) !!)
$onesunday = gmmktime(0,0,0,2,25,2001);
$i = 0;
$day_names = "";
$check_names = "";
while ($i<7) {
$day_names[] = strftime("%A",$onesunday + (($firstdayofweek+$i)*86400));
$day_names[] = gmstrftime("%A",$onesunday + (($firstdayofweek+$i)*86400));
//Calculate standard day of week (0=Sunday......6=Saturday)
//to store info in that exact order in DB
$stddayofweek = ($i+$firstdayofweek) % 7;

View File

@ -5,6 +5,6 @@
// database (backup_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
$backup_version = 2004051300; // The current version is a date (YYYYMMDDXX)
$backup_version = 2004051600; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.3 Beta +"; // User-friendly version number