• Resolved francoc30

    (@francoc30)


    My WordPress time zone is set to Toronto (Eastern time zone). I set Enable Time Zone Support to “No” in EM. All event times are 4 hours ahead of what I set. e.g. event time is set to 6 p.m. but it is displayed as 10 p.m. in the event list at the front end and in admin dashboard. I also use WP FullCalendar plugin. But the time displayed there is correct.
    Please help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter francoc30

    (@francoc30)

    Hello there,
    I wonder if my issue has been looked at. Its been over two days since my first post. Can support provides some feedback on the status please. Thanks.

    Hello,

    Sorry for the delay. If you have Enable Timezone Support? = NO then it will use the WP Settings under Dashboard > Settings > General.

    Have you also tried Resetting the Timezones? Events > Settings > General > Admin Tools (Advanced) > Reset Timezones.

    Another cause is you might be forcing it to display if different timezone? What are your settings under Events > Settings > Formatting > Date/Time? Can I perhaps get a screenshot of this section?

    Thread Starter francoc30

    (@francoc30)

    Hi @timrv ,
    Thanks for your reply though a bit late. I have reset the timezone under Admin Tools as you suggested, but it did not help. Below is a link to OneDrive where you can find my screenprints with all the values in my settings. I also included the views from FullCalendar and Event List of a past event so to show the difference in display.

    https://1drv.ms/w/s!Au6zjdJsfJ_PgdF0D7XpxRd4pU2Ikw?e=tZ3k4R

    Hello,

    Does this happen on all events even on newly created ones?

    As for the last screenshot from the document, Is it your Events page or is it from a shortcode? Could I also get a screenshot of your setting under Events > Settings > Formatting > Default event list format?

    If possible can We also get a link of the calendar and events page link?

    Thread Starter francoc30

    (@francoc30)

    It happened with new events and all past and future events.
    The event list from the last screenshot is from shortcode [events_list scope=’past’ limit=5 pagination=1 ][/events_list].
    I add your requested screenshot to the same document from the last OneDrive link.
    My test site is still under construction in a local setup. So you really cannot login there, sorry.
    I see from the support forum there are many users having the same problem as mine for the last few months. There has to be a fix by now.

    Hello,

    Sorry for the late response. I have testing the timezone on my test servers and for some reason I really can’t replicate it. I think there might be some server/hosting issue here. I have forwarded this to our Devs so that they could better address you.

    Thread Starter francoc30

    (@francoc30)

    Thanks for looking into this. I’ll wait for developers fixes.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    Hello,

    I’m not sure if this will help in your case, but try replacing the following function in classes/em-datetime.php with the following:

    
    	public function i18n( $format = 'Y-m-d H:i:s' ){
    		if( !$this->valid && $format == em_get_date_format()) return '';
    		//since we use WP's date functions which don't use DateTime (and if so, don't inherit our timezones), we need to preformat timezone related formats, adapted from date_i18n
    		$format = $this->formatTimezones( $format, true );
    		//if we deal with offsets, then we offset UTC time by that much
    		if( !function_exists('date_timestamp_get') && $this->timezone_manual_offset !== false ){
    			//PHP < 5.3 fallback :/ Messed up, but it works...
    			$timestamp = parent::format('U');
    			$server_offset = date('Z', $timestamp);
    			return date_i18n( $format, $timestamp - ($server_offset * 2) + $this->getOffset() );
    		}elseif( function_exists('wp_date') ){
    			return wp_date( $format, $this->getTimestamp(), $this->getTimezone() );
    		}else{
    			return date_i18n( $format, $this->getTimestampWithOffset(true) );
    		}
    	}

    We’ll be updating the plugin with this soon. If the above doesn’t fix it, the issue may well be server related.

    Thread Starter francoc30

    (@francoc30)

    Hello Marcus,
    Your revised function works. It fixed my issue. Thanks for the prompt attention to the matter, much appreciated.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Time zone off-set is incorrect’ is closed to new replies.