Working with Timezone


JS date return current date in client system (PC clock time)
PHP date return current date of server time. (server clock time) 
Current DateTime may vary with timezone.


For server ,
we can change and get timezone value.
set = date_default_timezone_set("asia/kathmandu");
get = date_default_timezone_get(); 


For client,
we can get current system date with respect to timezone. 
For this we can use moment.js









Share this

Related Posts

Previous
Next Post »