php - Confusion in time_zones -


i have set default_time_zone "asia/calcutta" server time..

date_default_timezone_set('asia/calcutta');  echo date("y-m-d h:ia", time()); 

now suppose person sitting in usa , australia has current times 8pm , 6am respectively.

my server current time : 12:30 pm

user 1 : 8 pm user 2 : 6 am.

now both of them writing blog or submitting posts on website gets stored in mysql. submitted according time? server time?

and when retrieve posts/blogs see blogged-time time? 12:30 pm or 8pm/6am??

i want respective persons respective countries see actual time when have posted blogs...

so user 1 see s/he has posted blog @ 8 pm , user 2 see s/he has posted blog @ 6 though time stored server time..


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -