Events page on g.d.o http://groups.drupal.org/events shows headings and events in the wrong order.

It should show:
Today
- some event(s) -
Tomorrow
- some event(s) -
Later this week
- some event(s) -
Later this month
- some event(s) -
October
November
...

Current state: http://groups.drupal.org/events
"Later this week" title before "Today" and couple of events with event date - yesterday.
Today and Tomorrow headers repeat several times one after another.

How to help:

Development site is ready - http://events-groups.redesign.devdrupal.org/
You'll need to get SSH access to the dev site, instructions here: http://drupal.org/node/1018084

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm’s picture

I think this would take me up to half a day to fix.

sreynen’s picture

Is the desired fix to get rid of those dates entirely or to move them under "Today"?

tvn’s picture

The desired fix is to show correct dates/events to the user.
If I open the page and it's 29th for me - I should see "Today" and events with starting date Aug 29th.

Not sure how exactly to fix this though. If I open/events right now, I can see 4 events under "Later this week" before "Today" (see screenshot). One of them for example has date: 2012-08-28 19:00 - 21:00 America/Los_Angeles. Which due to timezones is Wednesday 29th 05:00-07:00 for me. So technically it should be under "Today", but can we also display it's start date in the timezone of the current user? so for me it would show Aug 29th

sreynen’s picture

I don't think we can easily change the timezone we're using to display the date. That's set at the field level (currently set to the event's timezone), so it applies the same in lists and the event page itself. There's also anonymous users viewing this display, so if we did make it display relative to the user's timezone, the dates would change when you logged in.

Looking at the view and the code, I'm not clear on why we're seeing those dates at all, since both appear to be filtering based on the server's definition of "Today" (same Y-m-d value). I see an easy fix (change == to <=) that would move them up under "Today," but I'm not sure where to even start with any other fix.

drumm’s picture

I started the creation of a dev site named events for this. Will be done within 20 minutes.

tvn’s picture

Right now titles gone totally crazy on the page for me.
Looks like this:

Later this week
2 events, date Sep 12

Today
15 events, date Sep 13

Tomorrow
1 event, date Sep 14

Today
4 events

Tomorrow
1 event

Today
2 events

Tomorrow
4 events

Today
1 event

Tomorrow
1 event

Today
1 event

Tomorrow
9 events

Later this week
1 event, date Sep 15

Tomorrow
5 events

Later this week - and further headers work fine
Later this month
October
...

Development site is ready at http://events-groups.redesign.devdrupal.org/ if anyone can take a look at this.

hansfn’s picture

I'm asking for shell access now and will look at this on Sunday/Monday if nobody beats me to it.

tvn’s picture

Any news on this issue hansfn?

Pierre Paul Lefebvre’s picture

I've got a small problem here...

Technically, those are not past events, but "Today's events" in their timezone....
So I end up with Nov10 being today in Japan but I also have Nov10 in Tomorrow (if the event is in Chicago).

What do you guys think?

Note : I have changed the "dev" site to calculate the date_create('now') with the event's timezone. So at least now it shows under today instead of "Later this week".

tvn’s picture

I've added couple of test events on the dev site. The one with date/time: 2012-11-11 20:10 - 21:10 America/Los_Angeles - which is morning of Nov 12 for me still shows up on /events page at the very top, above "Today", with the heading "Later this month". :(

Event with date/time: 2012-11-12 21:40 - 22:40 America/Los_Angeles - which is morning of Nov13 for me shows up under "Today". Which is probably ok.

Pierre Paul Lefebvre’s picture

Status: Active » Needs review
FileSize
633 bytes

Not perfect logic wise, but no more weird titles.

tvn’s picture

I was browsing the dev site again and on http://events-groups.redesign.devdrupal.org/events?page=2 the titles are "Tomorrow" "Later this week" "Tomorrow" "Later this week." :(

hansfn’s picture

FileSize
921 bytes

OK, I promised to look at this almost two months ago, but real life came and distracted me. Anyway, attached is a patch that fixes the oscillating header issue, between today and tomorrow for example, (with the problem explained in the patch).

ADDED: Oh I forgot to comment on the original post:

couple of events with event date - yesterday.

The reason for this strange behavior is that the event date is displayed in the local timezone. That makes kind of sense. If I look at events in New York, I would like to see the date/time in New York, not UTC. What makes this strange of course is that we sort things based on UTC. Anyway, I think this can be improved by adding "(local time)" after the event date to explain it.

sreynen’s picture

The titles appear to be correct now, but the dates are still confusing. I see:

Nov 14, 2012
Nov 15, 2012
Nov 14, 2012
Nov 15, 2012

I imagine this is because the events' timezones are varying, so Nov 15 in one timezone can actually be before Nov 14 in another, but understanding that doesn't change my initial reaction of confusion. Explaining why the interface is initially confusing by adding more timezone labels seems kludgy to me. It distracts my attention from the activity of the events to timezone math, which is not really what we want users thinking about when they look at this list.

I think we should maybe take a step back and re-think this interface with less emphasis on the specific dates now that we know we can't move those dates into a common timezone as people would expect.

hansfn’s picture

Explaining why the interface is initially confusing by adding more timezone labels seems kludgy to me. It distracts my attention from the activity of the events to timezone math,

You misunderstood - the extra label should be just "(local time)", not the actual timezone. We should indeed not bother the users with timezone math ... Maybe "(local time in LOCATION)" is better?

We could of course just list all entries with date in UTC which would make the list looking nice. However, that isn't very helpful either. Imagine a guy living in New York (again). He looks at the list of events and sees a lot of events taking place the 15th of November. However, those events actually takes place the 14th of November in New York. (This is the case for any event starting 7 PM or later in New York.)

I'm not sure there is a perfect solution...

sreynen’s picture

It's really just thinking about timezones at all that I find distracting, not specifically math. I'm imagining the list would look something like this:

Nov 14, 2012 (local time)
Nov 15, 2012 (local time)
Nov 14, 2012 (local time)
Nov 15, 2012 (local time)

When seeing this, my thought process would be "Why is that out of order? Oh, it's local time, so those must be in different locations. That makes sense." What I want to be thinking is more like "I'm not interested in that event... Oh, that's an interesting event, I should click through to get more details, like the time."

If displaying everything in UTC is an option (I didn't think it was), I think that would be better than the date display being out of order and everything being timezone specific. Almost everything on Drupal.org (e.g. the comment times in this thread) and across the web is already displayed in a non-local time for the viewer, so while it isn't ideal, I don't think it would be confusing. By the time I post this comment, for example, it's going to say Nov 16, but it's still Nov 15 for me. That doesn't confuse me, because the times are consistently offset from my local time. It's the inconsistency that I find confusing.

I agree standard UTC isn't perfect, but I think it is better.

tvn’s picture

Almost everything on Drupal.org (e.g. the comment times in this thread) and across the web is already displayed in a non-local time for the viewer...By the time I post this comment, for example, it's going to say Nov 16, but it's still Nov 15 for me. That doesn't confuse me, because the times are consistently offset from my local time.

Actually when editing your Drupal.org profile, you can choose your timezone in Locale settings and all comments etc. will be displayed in your local time.

I created couple of test events on the dev site, tried different timezones and managed to get one event with the title "Later this week" on top of "Today". Considering that on Drupal 7 code of g.d.o and this specific page will changed completely, I think we should not spend more time trying to fix this on D6. How about switching to grouping events only by month starting from current?

sreynen’s picture

Actually when editing your Drupal.org profile, you can choose your timezone in Locale settings and all comments etc. will be displayed in your local time.

Oh wow, I can't believe I missed that all this time. Thanks!

+1 for grouping by month for now and improving this in D7.

tvn’s picture

Pierre Paul Lefebvre or hansfn, any chance one of you could modify the view to group events by Month only?

hansfn’s picture

FileSize
935 bytes

[...] managed to get one event with the title "Later this week" on top of "Today

I was able to reproduce this issue. I was also able to "fix" it - see attached patched. The problem is coming from Views - past events can appear dependent on the user's time zone. (The "Later this week" event is really a past event.)

Example: This event does appear in the events list if I use "Pacific/Tahiti". If I switch to "UTC", the event disappears from the list.

If we display only months, we will still have this problem with past events and on the first day of a month we might get events displaying in the month before. Because of this I'm -1 for grouping by month.

tvn’s picture

Events seem to be under proper titles now, and previous events have "Yesterday" title. However, since the dates are being displayed not in the user's timezone, it is really confusing. E.g. now I can see:

Today
Dec 9
Tomorrow
Dec 10

when it's actually Dec 10 today for me.

While we still will have some problems with events on the first day of the month, grouping by month at least eliminates this problem. You won't be confused by "why is it Dec 9 today?".

Ideally, of course, I would want us to recalculate event dates and show them in user's timezone, but that seems like too much trouble to implement. And also brings additional questions like - in what timezone should we display dates on event nodes? original or user's? or both?

hansfn’s picture

However, since the dates are being displayed not in the user's timezone, it is really confusing.

Yes, it is, but is it really less confusing when stuff is listed per month? The (potential) one day off is the real problem. When people see the entries listed per month and think the dates are correct, they are being fooled. With the current setup, they at least understand something fishy is going on :-)

I don't understand why the view isn't displaying the dates in the user's timezone. Everything else is... I'm guessing this is a bug in the Date module's Views integration. I'll have a look.

hansfn’s picture

OK, the problem with date display was in the theme - see patch 24-2 below. Now the list of events are displayed in the user's timezone. I have also removed the finished/pasted events from the list - see patch 24-3 below (which contains the fix from patch 21).

The only remaining problem is to decide if we want the local timezone, the user's timezone or both on the actual event page.

tvn’s picture

Awesome! I tried various timezones and the view seems to work correctly, dates displayed in user's timezone and past events are gone.

For the event nodes I think it actually makes sense to have both. We need to have user's timezone present, so that when a person follows an event link in the view, the date on the event is the same as in the view. On the other hand, if you are planning to attend an event far from your current location - it's useful to know actual event's date/time in said location.

hansfn’s picture

I agree that having both makes sense. Maybe someone else will add the extra date display on the event page? I guess it has to be done in the theme again.

I could do it, but I'm not a themer so I'm slow ...

tvn’s picture

I opened separate issue to deal with the dates display on event nodes #1865862: Add event's date in user's timezone on event nodes

hansfn, are the patches in #24 the final and only thing we need to deploy? were there any configuration changes on the dev site?

hansfn’s picture

Yes, the patches in #24 was the only thing I changed.

drumm’s picture

I committed the theme patch to bluecheese and merged to groups.drupal.org's repository.

sreynen’s picture

Status: Needs review » Fixed

This is deployed now. The current event list is especially short (2 events) on the first page, because the pager isn't accounting for the "yesterday" events we're now removing. I hadn't noticed that in testing. I think it's okay to leave as-is until we move to D7.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

update