The week and day views of calendar show times in the header that are 1 hour less than the times displayed on the node itself. I tried changing the site's timezone and changing the date field's timezone handling, but without luck. The error remains the same: 1 hour off.

As a quick workaround I added code in theme_calendar_time_row_heading (theme.inc) which adds 1 hour. This works for now, but I am looking for a real fix.

CommentFileSizeAuthor
#15 day_views_export.txt11.94 KBstanb
#6 calendar-patch.txt1.07 KBrjb
#4 agenda.png59.4 KBpfx
#4 agenda.png59.4 KBpfx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dotcomguy-1’s picture

I am having the same issue with 6.x-2.0-rc5. Additionally the date and and time of the event is not displaying in the "Upcoming" block or when viewing the event itself. Note that these issues only occur when logged out. When I'm logged in, everything works correctly.

My settings:

* Site timezone: America/New York
* CCK Field Time zone handling: Site's time zone

It seems that if I enable user-specified time zones and set my time zone, everything then works correctly but only for that user when logged on.

rjb’s picture

Thanks for reporting this. For me it did not work though.

I changed to 6.x-2.0-rc5, set the site's timezone to America/New York, enabled user configurable timezones, added a new user, logged in as this new user and set the user's timezone to America/New York. Though the times changed as expected, the times displayed on the views are still 1 hour less than the times displayed on the node...

By the way, I found a similar issue here. Looks like the submitter had the same problem, but the people who replied did not. They had configuration issues.

KarenS’s picture

Status: Active » Fixed

I broke this in a recent commit by changing the way I was grouping the times. I just fixed it again in -dev.

pfx’s picture

FileSize
59.4 KB
59.4 KB

Perhaps I missing something ?
The problem remaing the same for me
see png attached

rjb’s picture

Status: Fixed » Active

Karen,

Thanks for looking into this. The problem is still there though, like pfx said.

However I think I may have found something. I added "second" to the granularity and found that 14:00:00 (2:00:00pm) appears in the 13:00 cell which is wrong, but 14:00:01 appears in the 14:00 cell like it should. Additionally, when disabling "second" in granularity, and using the select list widget to enter a time it appears that some seconds are added automatically which causes the bug to be avoided. When using the date popup calendar to enter a time nothing is added, which triggers the bug.

rjb’s picture

Status: Active » Needs review
FileSize
1.07 KB

I think I found the problem. Here is a patch. I hope this patch does not break something else ;-)

pfx’s picture

I try the patch and it work for me!

Thanks

rjb’s picture

Great! Thanks pfx for letting us know.
Could someone review and commit my patch, please? It's just a small fix.

KarenS’s picture

Status: Needs review » Fixed

Fixed. Thanks!

Apollo610’s picture

Hi guys, I hate to be "that guy", but I manually made the 2 minor changes in theme/theme.inc file per the patch, and I'm still having the same problem with the calendar being 1 hour behind the event (ie, calendar shows 1pm, event was created for 2pm). My granularity is down to the minute - if I increment to 2:01pm, everything matches.

I even dropped the module, cleared the cache, then re-enabled the module and created a new content into the calendar and the problem's still there... am I missing another step along the way?

Thanks -

KarenS’s picture

Status: Fixed » Postponed (maintainer needs more info)

First of all, if you made changes you're not using the latest -dev because those changes are already in -dev. If you're having problems, be sure to use the very latest -dev of both Date and Calendar to see if your problems have already been fixed.

If you still have problems on the latest -dev, then I need enough information to reproduce your situation, exactly what kind of date field and widget are you using (an export of the date field using Content Copy will show me all your settings), what is your site timezone setting and your personal user timezone, how you have your calendar set up (an export of your view will show me that), what you use for the first day of the week, and an example of a node value that isn't working right.

Apollo610’s picture

Thanks Karen, actually I just refreshed both Date and Calendar with the latest packages and everything is all better now.

KarenS’s picture

Status: Postponed (maintainer needs more info) » Fixed

Then it's fixed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

stanb’s picture

FileSize
11.94 KB

I see this is fixed but I'm using what I believe to be the latest versions of Calendar, CCK, Views and Date and still have this exact issue of hour time diff between page view time and day view time. If I add a minute to the time (e.g., make 10:00am 10:01am) then it works as I would expect. Is it a granularity issue somewhere? All time zones are set for America/New_York.

I've attached an export of my day view if that might help someone to point me in the right direction.

Drupal 6.8
calendar-6.x-2.0-rc6.tar.gz
cck-6.x-2.1.tar.gz
date-6.x-2.0-rc6.tar.gz
views-6.x-2.2.tar.gz

I cloned the calendar view and modified Upcoming to show only future dates so I am working with this cloned view. Thanks for any help and the calendar module works perfectly other than this!

rjb’s picture

Hi Stan,

The rc6 version of calendar does not contain the patch. Please try the dev version of calendar (and date, just in case). Hope this helps. Good luck!

stanb’s picture

Hi rjb,
That was it. The dev version is newer than the rc6 version. (doh). Now I just need to figure out how to get the time to display in am/pm mode. Thanks a million!

Stan

rjb’s picture

You're welcome!

Regarding am/pm, it looks like it uses Drupal's system settings for that.

Go to Administer -> Site configuration -> Date and time. Then change the settings under Formatting.