Posted: April 2, 2014 at 7:29 am
|
I have read through forum topics, but non of the forum posts seems to help me.. Under “Upcoming Date(s) and Time(s)” my dates is displayed like this: I should read: november 11th, 2014 @ 20:00 I have set WordPress general settings to local timezone “Oslo”. I have set up wp-config whith: What else can I do? |
Hello, Have you also adjusted your time format in WordPress general settings? http://codex.wordpress.org/Formatting_Date_and_Time This looks like what you are looking for: M j, Y @ G:i –> Nov 6, 2010 @ 0:50 — |
|
|
Yes I have.. se image below. |
|
I’m sorry.. |
|
It looks like the date format is hardcoded in widgets/upcoming_events/EEW_Upcoming_Events.widget.php on line 296. You can modify it there but the modification will get overwritten each time you update. You can take a look at what I did here, https://github.com/sidharrell/EE4custom/tree/customWidget and do pretty much the same thing to have a customizable copy of the widget where you can modify the hardcoded date and time format and keep the modifications from getting overwritten. |
|
Hi, Sidney. It is not the widget I have a problem with, it’s the event page. |
Hi Tomsor3, It turns out that this isn’t a timezone problem, but along the lines of customizing the display’s time format. The event page uses a template function to display the date, and the date/time format can be customized, but not by changing date_default_timezone_set. Changing date_default_timezone_set will cause problems for WordPress and possibly Event Espresso [1] and [2]. I recommend removing the
form wp-config.php Then to change the time format display you can create a child theme and copy over content-espresso_events-datetimes.php from the Event Espresso plugins’s /templates/Espresso_Arabica_2014 folder to the child theme. Then you can change line 8 to read as follows: <?php espresso_list_of_event_dates( $post->ID, $dt_frmt = 'l F jS, Y', $tm_frmt = 'G:i' );?> This will change the time format that’s used when it displays the upcoming dates. [1] http://vip.wordpress.com/documentation/use-current_time-not-date_default_timezone_set/ [2] http://weston.ruter.net/2013/04/02/do-not-change-the-default-timezone-from-utc-in-wordpress/ |
|
|
Thanx. |
The support post ‘Timezone problems in EE4..’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.