The script do not do Geo location but very useful and will not let your user select their country or others. Relaying on this script is usable and will help you to add key feature in your website and provide usability regarding date-time across timezone.
Get Default Timezone in PHP
First Include a small minified js file in your page. Get it from the top of this website. Include it in your document or on your page,
Your timezone now in the variable called $timezoni, so you can use it alone to paste a timezone. Also another function date_default_timezone_set() is the PHP built in function which set the timezone for the user. so we set the timezone by giving it a variable, saying that my timezone will be this and do all according to my desired timezone. Now you can use timestamp(); function which will return you the timezone or you can extend for the user time not the server time.
Hope you like the tutorials if anything wrong happens then do comment we will try to help you regarding this.