How to find client(user) browser timezone in magento 2?

  • You can use GeoIP or Javascript. – Yogesh Oct 16 '17 at 8:55
  • catch $_SERVER['REMOTE_ADDR']; and translate it with GeoIP plugin or remote service – MagenX Oct 16 '17 at 9:59

You can do this in plain Javascript:

var myDate = new Date();

More info here: http://www.onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.