php - how to set date and time based on users location -


this question has answer here:

i want set date , time based on users location.

i used following php code set date , time in indian standard time.

how find users timezone.

<?php     $timezone = "asia/kolkata";     date_default_timezone_set($timezone);     $time=date("h:i a");     $date = date("m d,y"); ?> 

thanks in advance.

you need timezone javascript code, , transmit server.

examples can found here: get user timezone


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -