Timezone Issue

Home Forums Calendar Products Events Calendar PRO Timezone Issue

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1049517
    paulhazon
    Participant

    It appears that my Events Calendar plugin is reading the time as UTC, but I am in the Pacific timezone (UTC-8). As a result, my week views are switching to the next week 8 hours early. I’ve tried setting my timezone in WP as ‘Vancouver’ and also as ‘UTC-8’. Neither of these options make a difference. What can I do to fix this? Thanks.

    #1050667
    Barry
    Member

    Hi Paul,

    This looks like a bug and I have filed a report so we can address it in an upcoming release.

    In the meantime, if you’re comfortable doing so, you could try adding the following snippet to your theme’s functions.php file or else to a custom plugin:

    function temp_fix_42765( $date ) {
    	global $wp_query;
    
    	if ( ! empty( $wp_query->get( 'eventDate' ) ) )
    		return $date;
    
    	if ( defined( 'DOING_AJAX' ) && DOING_AJAX )
    		return $date;
    
    	try {
    		$week_start = new DateTime( current_time( 'Y-m-d' ) );
    		$offset = 7 - get_option( 'start_of_week', 0 );
    		$week_start->modify( - ( ( $week_start->format( 'w' ) + $offset ) % 7 ) . 'days' );
    	}
    	catch ( Exception $e ) {
    		return $date;
    	}
    
    	return $week_start->format( 'Y-m-d' );
    }
    
    add_filter( 'tribe_get_first_week_day', 'temp_fix_42765' );

    That should provide temporary relief … if not, we can always wait out on a substantive fix in a future release (and of course we’ll do our best to post an update here in this forum topic when that is available) 🙂

    Thanks for reporting this and our apologies for any inconvenience it has caused.

    #1076478
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

    #1088770
    Leah
    Member

    Hello,

    Thank you for reporting this issue. We weren’t able to get a fix for it into our upcoming release (4.1). However, please know that the problem is still on our radar and is ticketed within our system to be addressed in a future maintenance release. We’ll do our best to keep you posted when we are able to get a solution in place. Thank you for your patience while we improve and expand our plugins.

    Best,
    Leah

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Timezone Issue’ is closed to new replies.