When the calendar block's "today" highlight advances to the next day, it does not update the Drupal cache. To reproduce this issue, I made the calendar block visible on the front page, turned on regular caching, then visited the front page while logged out to generate a cached version. I waited 24 hours without touching anything on the site. When I visited the front page again, the "today" highlight on the calendar block was stuck on the previous day (the day the page was cached). When I logged in, thus bypassing the cache, the highlight advanced to the correct day. Logging out took me back to the incorrect cached version.

On a related note, the highlight also seems to run 5-7 hours ahead of the correct time. I'm pretty sure I set the time zones correctly...

Comments

nancydru’s picture

Good catch. Are you sure your time zone isn't at least partly responsible?

Grantovich’s picture

I would say it's not a time zone issue because when I first noticed the problem, it was when I hadn't changed the site for three days, and the highlight appeared three days behind when I wasn't logged in. I don't think even the worst time zone bug could shift it more than two days away from the real date (and besides, the highlight is always correct when not viewing the cached version of a page).

If you were referring to the 5-7 hours problem, I have no idea. Every option in Drupal and the Event module is set to use the sitewide time zone, so it's all locked in. The weird thing is that my time zone is minus 4 hours, and the highlight definitely isn't 4 hours off (I know for sure it's between 5 and 7 hours, haven't pinpointed it yet).

killes@www.drop.org’s picture

Status: Active » Fixed

The event block is simply cached by Drupal's cache for nonymous users. There isn't really a work around other than disabling the cache.

Anonymous’s picture

Status: Fixed » Closed (fixed)
Anonymous’s picture

Couldn't you implement hook_cron(), detect day changes between current and last cron run and in that case clear the cache programatically?

dboulet’s picture

I was experiencing this problem, and found the CacheExclude module useful.