Incorrect time on events listings
Home › Forums › GovIntranetters › Incorrect time on events listings
Tagged: events
- This topic has 8 replies, 4 voices, and was last updated 10 years, 3 months ago by 
colshaw.
 
- 
		AuthorPosts
 - 
		
			
- 
21 May 2015 at 09:27 #1803
PamO
ParticipantI 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?
 - 
21 May 2015 at 20:26 #1804
Luke Oatham
KeymasterHey Pam – there are some new updates on github which should fix this.
 - 
9 Jul 2015 at 08:31 #1892
colshaw
ParticipantPamo – 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.
 - 
9 Jul 2015 at 10:54 #1894
rportman
ParticipantHi 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 - 
9 Jul 2015 at 10:56 #1895
rportman
Participant….of course the comments box has removed the ‘strong’ html tags đ
 - 
9 Jul 2015 at 11:29 #1896
rportman
Participant…on second thoughts, don’t do that, the time is correct but it’ll display today’s date :/
 - 
9 Jul 2015 at 11:49 #1897
rportman
ParticipantOk, 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 - 
9 Jul 2015 at 13:00 #1898
PamO
ParticipantYes. The update fixed the issue for me. I didn’t have to fiddle about with anything.
 - 
14 Jul 2015 at 09:40 #1904
colshaw
ParticipantI 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)).”“; 
 - 
 - 
		AuthorPosts
 
- You must be logged in to reply to this topic.