The Open Atrium Event Detail view uses a custom formatter for the Event Date: "Next Upcoming Date" for both the Date and the Time of the event. These dates cannot be localized so one is forced to use a normal date and time display, but then one loses the labels.
The involved code is in oa_events.module starting from line 226
// Create an array of time / date information for ease of use.
$dates = array(
'start' => array(
'time' => date_format_date($start_date, 'custom', 'g:iA'),
'date' => date_format_date($start_date, 'custom', 'l, M j, Y'),
),
'end' => array(
'time' => date_format_date($end_date, 'custom', 'g:iA'),
'date' => date_format_date($end_date, 'custom', 'l, M j, Y'),
),
);
Comments
Comment #1
Argus commentedComment #2
Argus commentedComment #3
Argus commentedI suggest to use the date and time formats available:
Comment #4
Argus commentedAdded a patch for that.
Comment #5
Argus commentedComment #6
Argus commentedThis doesn't work for the "time" part, that isn't a default Drupal available format.
Comment #7
Argus commentedComment #8
Argus commentedtypo
Comment #9
hefox commentedComment #10
ikkyu commentedSweet ! I was wondering where to customize the next upcoming date in Event Details view. I just changed the code with my own custom date format and now everything is displayed as it should. I'll have to modify the oa_events.module file after each Open Atrium updates until this is fixed but it will do for now. Thanks a lot Argus, you saved my day.
Comment #11
mpotter commentedikkyu: Since the patch doesn't work for the Time portion as mentioned in #6, what did you do instead?
Comment #12
mpotter commentedI committed a fix for this in oa_events 5f77b2d. I added config strings for specifying the date and time formats so you can set them as needed. The Drupal "long" format didn't match what we needed here.
Comment #13
ikkyu commentedInstead of using a drupal predefined format like the patch I just put my own custom date format like the original code.
So now I have the right french format for the date and the time.
Comment #14
mpotter commentedOK cool. In v2.60 you'll be able to just go to the Admin -> Open Atrium -> Config page and enter those values into the fields for events.