Posted: December 1, 2014 at 5:58 am
|
Hello, I am creating a custom widget for a website we are building due to we need a very custom widget all is working well however having issues with getting the time / date to display properly. So to start of with un-aware with the built in function. I did the following code:
This worked however the times displaying on the website were an hour early. So i look into the code of event expresso and found
now first of these are echoing there output, which a function should not really be doing, (I need to pass them into another variable) Is there a custom way that I can change the date format to display the correct time, and not an hour earlier? Many Thanks |
Hi, The date times for events are stored in the database as UTC and then are adjusted based on your WordPress timezone settings. Do you have WordPress set to use a city or region near you through WP General Settings? — |
|
|
Yes we do we have it set to london. Basically i want to output: Something like that with the date the start time and end time. I have got it to out put the date and time by using the functinos and creating my own with the following code.
However I feel that code is somewhat hacky to get what I want. Is there a better more efficiently ways to do it? Many Thanks. |
Hi, You could create a customized version of the espresso_list_of_event_dates function. There is an example here (towards the bottom of page): https://gist.github.com/lorenzocaum/ac217033f12232404cce#comment-1348273 The new function as is will look like this: http://cl.ly/image/3j2I252G2R1P However, you could customize it further. — |
|
The support post ‘Gte the event Dat Function – EEH_Event_View::the_event_date – Not working?’ 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.