When I echo
date_default_timezone_get()
It echo's the server datetime instead of my current timezone. I wanted to have my real timezone. How can I proceed with this.
When I echo
date_default_timezone_get()
It echo's the server datetime instead of my current timezone. I wanted to have my real timezone. How can I proceed with this.
You can set your default zone with:
date_default_timezone_set('America/Los_Angeles');
and get it:
$your_timezone = date_default_timezone_get();
Here you can check supported timezones.
PS: When you know how to set timezone, you can get users browser timezone, tutorial but you should use JS :)