• Resolved e.lito

    (@elito-1)


    Hi,

    i’m facing to a bug with hour, someone talk about that** in support but nobody really found the solution, and neither do i.

    Here is the problem, events hour is good in calendar view and in backoffice, but not in event view and list view. It’s seem to come from #_EVENTTIMES placeholder.
    It use i18n($time_format) in output_times function in em-event.php (line 2588) and this return bad hour. $this->start() is ok.

    It’s too difficult for me to investigate more so, i hack this function by changing this :
    $replace = $this->start()->i18n($time_format). $time_separator . $this->end()->i18n($time_format);
    to this :
    $start_text = date(‘H \h i \m\i\n’, strtotime($this->start()));
    $end_text = date(‘H \h i \m\i\n’, strtotime($this->end()));
    $replace = $start_text. $time_separator . $end_text;

    Hope this can help everybody to solve this bug.

    Could you please give me a clean fix for this ???
    Thank you.

    FRENCH
    —————————————————————————————————————————————————————
    Salut,

    Je suis confronté à un bug avec heure, quelqu’un en parle ** dans le support mais personne n’a vraiment trouvé la solution, et moi non plus.

    Voici le problème, l’heure des événements est bonne en vue calendrier et en backoffice, mais pas en vue événement seul et en vue liste d’évènement. Le problème semble provenir du placeholder #_EVENTTIMES.
    Il utilise i18n($time_format) dans la fonction output_times dans em-event.php (ligne 2588) et renvoie une mauvaise heure. $this->start() est ok, cela donne la bonne donnée.

    Il est trop difficile pour moi d’enquêter davantage, j’ai bidouillé cette fonction en modifiant ceci:
    $replace = $this->start()->i18n($time_format). $time_separator . $this->end()->i18n($time_format);
    pour ?a :
    $start_text = date(‘H \h i \m\i\n’, strtotime($this->start()));
    $end_text = date(‘H \h i \m\i\n’, strtotime($this->end()));
    $replace = $start_text. $time_separator . $end_text;

    J’espère que cela peut aider tout le monde à résoudre ce bogue.

    Pourriez-vous s’il vous pla?t me donner une solution propre pour cela ???
    Je vous remercie.

    **https://www.ads-software.com/support/topic/time-is-offset-6-hours/
    **https://www.ads-software.com/support/topic/event-manager-time-not-correct/

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    have you tried resetting timezone under Events > Settings > General > Admin Tools > Reset Timezones ? also, you can try to install and activate WP Safe Mode to determine if there’s any possible theme or plugin conflict.

    https://www.ads-software.com/plugins/wp-safe-mode/

    Thread Starter e.lito

    (@elito-1)

    Hi,

    yes i try what you suggest : resetting timezone and activate WP Safe Mode but nothing happen.

    When i investigate directly in code if i ‘echo’ this : $this->start() hour is OK
    if i ‘echo’ this : $this->start()->i18n($time_format) hour is wrong.

    So i think you have a problem here.

    About WP Safe Mode, thank you this plugin is amazing i just regret that it does not reactivate plugin when you disable safe mode.

    Hello,

    Are you using UTC Timezones? Can you perhaps try changing the timezone to none-UTC. There’s currently a bug with the latest version for timezones that the devs are aware. We’ll be releasing and update soon.

    Thread Starter e.lito

    (@elito-1)

    Hello,
    actually the setting is ‘UTC+1’
    before i tried ‘UTC’ and ‘Paris’ without any effect.

    I changed this parameter in ‘wp general settings’ and ‘events manager’.
    I also tried to desactivate timezones.

    I can give you access if you want.

    Maybe de next version will fix this.

    Thank’s for your reply.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    Hello, can you try the latest EM dev version 5.9.8.2 and confirm?

    Thread Starter e.lito

    (@elito-1)

    hi, sorry for delay

    the dev version fix the problem, i install it and hours are correct.

    Thank you for your help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wrong hour problem (1h delay)’ is closed to new replies.