Incorrect time on events listings
- This topic has 8 replies, 4 voices, and was last updated 9 years, 5 months ago by .
Viewing 8 reply threads
Viewing 8 reply threads
- You must be logged in to reply to this topic.
Home › Forums › GovIntranetters › Incorrect time on events listings
Tagged: events
I just noticed all the events are showing as 12:00am in our events listings page, although they have the correct times when you click through to the event page.
Has anyone else experienced this and if so have you got a fix?
Hey Pam – there are some new updates on github which should fix this.
Pamo – Did you resolve this issue after updating, we have just activated the plugin on version 4.2.1.2 and still have the issue you describe.
Thanks.
Hi all,
Replace the following line (about line 140) in page-events.php:
echo ““.date(‘l j M Y g:ia’,strtotime($thisdate)).”“;
with
echo “ “.date(‘l j M Y g:ia’,strtotime(get_post_meta($post->ID,’event_start_time’,true))).”“;
..you you see the event start time again.
Regards
Rob
….of course the comments box has removed the ‘strong’ html tags đ
…on second thoughts, don’t do that, the time is correct but it’ll display today’s date :/
Ok, I think I’ve got it now, put the following code between the html strong tags:
.date(‘l j M Y’,strtotime($thisdate)). ” ” .date(‘g:ia’,strtotime(get_post_meta($post->ID,’event_start_time’,true))).
You’ll now get the correct date and start time of the event.
Regards
Rob
Yes. The update fixed the issue for me. I didn’t have to fiddle about with anything.
I am not sure why it works for others and not us but in the end I went with adding the following 2 lines for it to function and show the correct time.
$thistime = get_post_meta($post->ID,’event_start_time’,true);
echo ““.date(‘l j M Y’,strtotime($thisdate)).” “.date(‘g:iA’,strtotime($thistime)).”“;
Cookie | Duration | Description |
---|---|---|
comment_author_email_{HASH} | Under 1 year | This is purely a convenience, so that the visitor wonât need to re-type all their information again when they want to leave another comment. |
comment_author_url_{HASH} | Under 1 year | This is purely a convenience, so that the visitor wonât need to re-type all their information again when they want to leave another comment. |
comment_author_{HASH} | Under 1 year | This is purely a convenience, so that the visitor wonât need to re-type all their information again when they want to leave another comment. |
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
wordpress_logged_in_[hash] | Indicates when youâre logged in, and who you are, for most interface use. | |
wp-settings-{time}-[UID] | This is used to customize your view of admin interface, and possibly also the main site interface. |
Cookie | Duration | Description |
---|---|---|
_ga | 2 years | Used to distinguish users. |
_gat | 1 minute | Used to throttle request rate. |
_gid | 24 hours | Used to distinguish users. |