Quote:
Originally Posted by Zoopy
Mines set to Eastern Time. So from you homepage you can click the linkable date and it brings you to the event page?
|
Yes, but mine shows up on the 18th on the
home page grid, since I am +16 hours from the event. I can click it and it takes me to the correct day. That's why I think there must be a mismatch between the way the home page reads your timezone and how the
calendar reads it.
I'll dig into the code to check it out.
EDIT:
heh, I am amazed nobody picked this up in the minicalendar before.
The home page uses a module system called
vBadvanced. The loaded module, minicalendar.php loads the dates using the following code:
PHP Code:
$vba_today = getdate(TIMENOW - $vbulletin->options['hourdiff']);
The 'hourdiff' option is obviously your UTC offset as set in your settings. However, it's one simple arithmetic error which throws it out: If my offset is say -5 (EST), then they're trying to subtract -5 from TIMENOW, so they're effectively adding 5 to TIMENOW, which should be the opposite. If you are behind UTC, then you should be
adding -5 (which ends up subtracting 5).
So, a change to:
PHP Code:
$vba_today = getdate(TIMENOW + $vbulletin->options['hourdiff']);
Seems to have fixed the problem. Note that the minicalendar also uses a caching system to save on queries. I reset this for the purpose of the test, but I don't know whether this resets it globally or per-user. So, I have set it back to cache every 12 hours, but am not sure whether you trigger the cache or the system. If it's you, then you may not see the result for another 12 hours. Please report any anomalies.
Also, in the meantime, I enabled birthdays to show up on the calendar
EDIT 2:
It seems that the problem is fixed for you guys, but not for me now. I think that hourdiff might be read from the forum global settings rather than the user-specific settings. In which case, it'll show right for most of US / Canadians, but not for other timezones due to them being outside the forum default.
I'll leave it as-is for now and look into it further later.
EDIT 3:
It does seem to use a global setting, since the user-specific setting is:
PHP Code:
$vbulletin->userinfo['tzoffset']
Not only that, but the caching system seems to cache at the last viewing user, therefore if the cache is written by a different timezone, subsequent users in a different timezone will see the wrong zone for the next 12 hours.
The only way to resolve this is to turn caching off for the moment, but I'm reluctant to do that due to load. I'll leave it as-is for now.