Incorrect time on events listings

Home Forums GovIntranetters Incorrect time on events listings

Tagged: 

Viewing 8 reply threads
  • Author
    Posts
    • #1803
      PamO
      Participant

      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?

    • #1804
      Luke Oatham
      Keymaster

      Hey Pam – there are some new updates on github which should fix this.

    • #1892
      colshaw
      Participant

      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.

    • #1894
      rportman
      Participant

      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

    • #1895
      rportman
      Participant

      ….of course the comments box has removed the ‘strong’ html tags 😉

    • #1896
      rportman
      Participant

      …on second thoughts, don’t do that, the time is correct but it’ll display today’s date :/

    • #1897
      rportman
      Participant

      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

    • #1898
      PamO
      Participant

      Yes. The update fixed the issue for me. I didn’t have to fiddle about with anything.

    • #1904
      colshaw
      Participant

      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)).”“;

Viewing 8 reply threads
  • You must be logged in to reply to this topic.