Support » Plugin: Event post » Issue with google calendar link and timezone

  • Resolved miksir


    1. get_option(‘timezone_string’) probably return null if Manual offset UTC+X value set up in wordpress settings. As result “ctz” argument empty and google reject to create new event.

    2. Not sure but probably time in create event link (dates=) should be in UTC. But PHP date give time in local timezone (set up in php.ini).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bastien Ho



    the ctz parameters will now only be added if the timezone string is set.

    It’ll be in the next release.

    Thank you.

    p.2 important too. WP is overwrite default timezone in scripts to UTC. So date === gmdate and work with UTC. But by the fact it’s not UTC 🙂 Example:

    Moscow time is 20:00. Event time is 20:00. Timezone in WP admin interface settings – Europe/Moscow (it’s UTC+3). We are sending to google dates=20170930T200000Z/20170930T220000Z&ctz=Europe/Moscow (Z in time means UTC+0). As result we are getting event start at 23:00 UTC+3 (google think that event is 20:00 UTC+0 and convert to UTC+3 timezone).

    We can’t use gmdate instead of date for get UTC time because internal timezone of script sets to UTC. For self I did quick fix just removing Z from both dates (like ates=20170930T200000/20170930T220000), and it’s work well. Other solution is to modify date using timezone from WP settings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Issue with google calendar link and timezone’ is closed to new replies.