• Resolved jmccoy78

    (@jmccoy78)


    Interested in your plugin.

    Does your plugin just work for Posts or can it be used for all visitors to a website? I will be putting events on my website and need the dates / times to be timezone aware. Currently I can only use my WP timezone setting which will cause a problem as the events will be attended from a Global user base.

    thanks- Justin

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author drmikegreen

    (@drmikegreen)

    Hi, Justin!

    The plugin should make all dates that are generated via WordPress by PHP be in the time zone of the user.

    God bless and Merry Christmas!

    Mike Green

    Plugin Author drmikegreen

    (@drmikegreen)

    Thread Starter jmccoy78

    (@jmccoy78)

    Hi,

    thanks for the reply ?? so your plugin does not check web browser timezone location? how does your plugin check through WP PHP where the user is based by timezone please?

    God Bless and Merry Christmas to you also.

    Plugin Author drmikegreen

    (@drmikegreen)

    The plugin retrieves the time zone of the client using https://cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.4/jstz.min.js the first time that a client accesses the site, sets a cookie containing the client’s time zone on the client, and reloads the page. This cookie is then read by PHP and the date_default_timezone_set() function is used to set the default time zone for PHP scripts.

    The plugin does, therefore, set PHP to use the timezone set in the user’s computer. (If the user travels to a different timezone, takes their computer with them, and does not change the timezone of their computer, the timezone used will be that set on the computer — not that of the location.)

    Again, God bless and Merry Christmas!

    Thread Starter jmccoy78

    (@jmccoy78)

    ok – thank you very much. I’ll test your solution and fingers crossed this will work ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘The dates/times timezone’ is closed to new replies.