Support

Home Forums Event Espresso Premium Problem showing 24 hour event datetime format in front-end

Problem showing 24 hour event datetime format in front-end

Posted: March 17, 2017 at 3:45 am


ardiaful

March 17, 2017 at 3:45 am

I have dealt to change the event date time picker format to 24 hours, adding the code in this post: https://eventespresso.com/topic/localisation-of-datepicker-in-ee4/#post-171758, to my custom plugin.

However, date times in my front-end still want to display as am/pm format. I’m using the Januas theme. Do you know any existing conflict that makes Januas theme event date times format be different from those in the EE date time picker?

I’m using this code in my single-espresso_events.php

 $initialadate = $session_result[0]->DTT_EVT_start;
      $initialendate =$session_result[0]->DTT_EVT_end;
      $adate =$session_result[0]->DTT_EVT_start;
	//$initialadate = $_GET['date'];
	//$initialendate = $_GET['endate'];
      $endateformated = date("m-d-Y H:i:s", strtotime($initialendate));
      $newwdateformated = date("m-d-Y H:i:s", strtotime($initialadate));


ardiaful

March 17, 2017 at 3:51 am

This is solved. I was using a $time_format = 'g:i a ' instead of H:i:s

The support post ‘Problem showing 24 hour event datetime format in front-end’ 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.

Event Espresso