ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Convert Opening Hours to Visitor's Timezone

June 07, 2012 10:51pm

Subscribe [2]
  • #1 / Jun 07, 2012 10:51pm

    BA Creative

    3 posts

    Hi All,

    I want to display to site visitors opening hours converted to display in the visitors timezone.

    “7am-7pm” in server time AU would become “10pm-10am” UK

    Is this possible with the IP to Nation in combination with any existing plugin? or is this a job for JavaScript?

  • #2 / Jun 09, 2012 3:50pm

    Rob Allen

    3114 posts

    I don’t think you do that much with the IP to nation module other than band users and show flags 😊 You could try using the IP2nation flags tag to see if you can get it to output other data such as times but you then have the problem of all the time variations around the world, eg in the UK we have different times in the summer and winter (+/- 1 hour) so you’d need to take that into account.

    You could do it with javascript, but again you’d probably end up using the users local time on their device, and if that’s out so will your open/close times.

    If it were me I’d skip the clever way and provide open/close times in simple text format for each country/region/timezone.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases