local time zones
-
Hi Guys, this is my second post, iv been busy learning about wordpress plugins and especially OOP, im also doing well with learning PHP from developing javascript previously, my question to the group is this;
im developing a plugin that uses dates for WooCommerce checkout pages etc, i need to manage different countries time zones in the respect the plugin will be used in different countries, any idea how i grab the local time zone? and any change in date due to time zones? is this built into wordpress API? in other words on the backend settings the time zone also need to appear for the admin to select certain dates to add to an array/options, any links or advice would be great to get me going down the right path here…..
One last thing, im considering using Moments.js as iv used it many times before, anyone used this with a wordpress plugin? im going to let the admin change a date format ie. dd/mm/yyyy then pass over this option to the front end javascript, then change this date format using moments.js? to populate a date on the checkout…. i’m just wondering if this sounds like a fair solution to managing different date formats, especially to allow, ie. Tuesday 10th 2020
Thanks for any help, its appreciated
- The topic ‘local time zones’ is closed to new replies.