If you're fine with adding Javascript to your project, then you can try ChronoMouse.js , which will help you get the current time, GMT offset, time zone name, location, capital, daylight saving laws or daylight saving time status for any code in the USA / Canada or country code.
For country codes, information is based on the capital.
For instance:
console.log( getLocalInfo('+49').time.display );
See www.chronomouse.com for more examples and documentation .
Note. I am the author of the project.
source
share