I have a client program that sends time to a server program.
I am using a Callendar object to pass time values โโfrom client to server.
My client program is in Sri Lanka, and the server is in the UK.
When I send the time (example: 2011-11-21T12: 43: 41.352 + 05: 30) on the client side, as usual, the time for converting to UK Time on the server (example: 2011-11-21T07: 13: 411,352 +00: 00).
I want to get the time that I send to the client program with the time zone in the client program. (Simply put, I want to read the time on the server without TimeZone conversions applicable to the time it is sent by the client-side program. Therefore, on the server I want to get the time as 2011-11-21T12: 43: 41.352 + 05: 30 not like 2011 -11-21T07: 13: 411.352 + 00: 00). <w>
Can I find out if this is possible with java, and if so, how?
Client side:
Calendar cal1 = Calendar.getInstance(); Date indate = new Date();
Serever Side:
SearchDateRange_type0 serachDaterange= criterion_type.getSearchDateRange(); checkInDate = serachDaterange.getStart().getTime(); //I read this as 2011-11-21T07:13:411.352+00:00
source share