When I create an event that takes place after 7pm (19:00), OpenChurch displays the "when" information from the node correctly, but the PHP prints the date one day later on the "Events" page. (see the attached image)

Again, this only happens when the event takes place after 7pm. I'm in Mountain time, if that makes a difference.

CommentFileSizeAuthor
Screen Shot 2012-05-19 at 12.21.43 AM.png13.83 KBAnonymous (not verified)

Comments

drupalninja99’s picture

Did you install this as 1.10-alpha1 or did you install it as an earlier version? I thought the bug was a few versions back where we had a php field rendering the short date, then we converted the view to use a date field instead. It's possible if you installed the earlier version, upgraded and didn't revert the view that it's still using the old view. Is that the case or was this installed as 1.10-alpha1?

Anonymous’s picture

Thanks for replying.

I installed the previous version and then upgraded to 1.10-alpha1, but it doesn't seem to have changed the Events view. I even tried clicking "revert" on the Events View just now, but it still has the short date being rendered by the following PHP:

$date = $data->_field_data['nid']['entity']-> field_oc_dates[LANGUAGE_NONE][0]['value'];
print date('m.d.y',strtotime($date));

Any advice? I suppose I could just go in and manually replace it with a date field.

Code Monkey’s picture

Do you have an custom date format created? You will need to create a new date format. You can get to that under the Formats tab (admin/config/regional/date-time/formats) located on the Date and Time configuration page (admin/config/regional/date-time). The format should be "'m.d.y". This would be the same format as shown on the Events view.

We now need to "Add date type", which is found on the Date and Time configuration page. In item #10 of issue #1463464: Removing dependency of views_php module we came to the decision to name this format "openchurch_short_date". You will want to select the previously saved date format.

Once this new date type / format is created, you can modify the Events view to remove the PHP field and add another field for When and use this new date type for the format.

It may be easier to create a new installation with an updated version. You might be able to export the view from the newer version back into your current version.

If you need additional information on what else to do, let me know and I'll try to scrounge up the rest of the instructions.

Anonymous’s picture

That worked perfectly, thank you so much!

Code Monkey’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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