try this .. it is using javascript to achieve the same thing.
http://techidiocy.com/java-server-and-client-time-zone-difference-problem-solved

Thanks