java - Time Zone issue with server and html client -


basic requirement server has data gmt +00.00 , browser needs request data server between dates(not time). let's say, 1 record saved on server on 28th march,2015 night usa local time. server following gmt +00.00 record saved 29th march, 2015 morning gmt.

now html retrieving same record server. server have gmt 29th march,2015. want display local date per time zone of browser. client , server communication date not time.

right server give 29th march, 2015 client. should display local date i.e. 28th march, 2015. how can manage display date among different time zone?

any idea or suggestions appreciated.

well, 1 solution create column in database real timestamp of date, time included. so, show date (reformated if want) client , keep gmt +00.00 process part.

the problem here, if think since don't save time part, it's impossible if day/night.

the other solution change actual date datetime , save in gmt +00.00 column specifying offset between gmt +00.00 region , other (here, usa).

some maths should do.

i can't propose written solution since don't specify server language (unless it's javascript ?).

by means, luck ;).


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -