- Admin >> Configure >> Variables
- your user profile ?
Can you provide us with some more data, please? Specifically:
- Version of Moodle
- Version of calendar/lib.php (it's in the comment in the first line)
- Server's physical location (its timezone interests us)
- Moodle configuration setting: timezone
- User's profile setting: timezone (for the user account which sees the problem)
Thanks!
Jon
Joe,
1. Moodle Ver. Moodle 1.4.3 + (2004083134)
2. calendar/lib.php: I'm not really sure where to look for this. In the server?
3. Server's physical location is Pusan, South Korea (Pukyong National University)
4. Configuration setting for timezone: Thurs., 12:59 p.m. (GMT+9)
5. I'm not sure about the user's profile setting for timezone. Maybe that's what I have for question 4
Once again, I'm not really sure what the timezone has to do with this. For me, in Korea, today is Thursday, February 24. It may be Wednesday, February 23 in your neck of the woods, but tomorrow it will be Thurs. the 24th. On my calendar, it is Wednesday the 24th.
I'm getting the sense that this is a server problem, yes? So Moodle calendar is pegged to some internal clock in my server, and in order to fix this I'm going to have to get my server admin to monkey around with the setting for the server. Sound about right?
Can you make try some forum postings and check the date displayed for them?
- If these are having the same problem as the calendar then something is very wrong on the server.
- If those dates are OK and only the calendar is wrong then we have a bug of some kind that no-one else has found before and Jon really needs to look at it.
Can you please have a look at the file calendar/lib.php (on the server, yes) and tell us what the version info in the first line says ...?
Yes, I will contact my server admin tomorrow (it's close of business time here) to have a look at the version of calendar/lib.php. I had a feeling this was a problem on our end. Thanks for all of your help. I'll post the results tomorrow.

If I 'm not mistaken, that case was also in Korea, GMT+9. This cannot be a coincidence. The trouble is, unless somehow we can duplicate it, there's not a thing we can do.
Maybe if we got an SQL dump with enough data... but that would be hard to arrange.
I'm also in Korea GMT +9, but I don't have this problem, in either 1.4.3 or 1.5 dev.

I am running my own server (Fedora Core 3).
Tim.
I think someone else was having this exact problem some time ago. The problem is, I couldn't reproduce it then, and I cannot reproduce it now. Setting my timezone to GMT+9 didn't help any.
I 'll sleep on it. Martin, if you get any sudden flashes of light...


You will need to test this for us though. It will require a small modification to one of the Moodle source files. However, it's very simple to make and it it also risk-free, it will definitely not make things worse. I am hopeful that it will fix the bug, though.

In calendar/lib.php, find the line which reads:
$startwday = gmdate('w', $display->tstart);
(this is line 100 in my copy of the latest 1.4.x, it should be the same or very near that in your copy)
Change the line to:
$startwday = date('w', mktime(12, 0, 0, $m, $d, $y, 0));
...and hopefully visit your Moodle to find the problem fixed. Can you do that?
Jon
I had the same problem with it so I tried this fix. Now all my months start on Sunday with the 1st of the month. So April 1st is a Sunday. May 1st is a Sunday etc.
We've actually begun having a similar problem, but with an even stranger twist: For one user, the calendar presents one day off. For everyone else, it appears to be working correctly. I tried logging in at different computers, but still have the same problem. The only unique thing about this user that I can determine is he was one of the first people we put into the system. But, the admin account is working fine (and it would have been created early on, too.)
So, any insights or ideas would be appreciated!
Sharon Gray, Augustana College, Sioux Falls, SD
Hi, Folks. I'm replying back to my original post because the "time zone" answer turned out to be the trick! I wanted to make sure anyone else encountering the problem knows to look into this.
For some reason, that one user had his profile set to our actual timezone while everyone else was set to "server's local time." When we changed his profile to "server's local time", the calendar showed the correct dates!
Sharon