Study Up
You should do a bit of study on how tracking date-time on computers works. Start with this question, Daylight saving time and time zone best practices. Do some other searching on StackOverflow to find many helpful discussions and code examples.
Basically your question is a duplicate of many others.
Unclear Question
Your question does not give enough information to help us help you. Exactly how does your GWT app capture the date-time from the user, in exactly what data type? From exactly where does the server store the date-time value and using exactly what data type?
General Tips
Never trust the date-time on a client machine. Always use your own server for current moment, if at all possible.
Servers should be set to a time zone of UTC, or if not physically possible in your OS, then set to a time zone of Reykjavík, Iceland.
Keep all your business logic and data storage in UTC. Convert to a time zone only as needed for presentation to the user.
Never rely on the implicit use of the JVM’s current default time zone. Always specify the desired/expected time zone.
Never use the java.util.Date/.Calendar classes. They are notoriously troublesome, confusing, and flawed. Instead use either Joda-Time or the java.time package built into Java 8 (inspired by Joda-Time).
If serializing the date-time value to text, use the ISO 8601 standard format such as 2014-10-21T07:11:31.028Z
.
Example code in Joda-Time 2.5.
DateTimeZone zoneParis = DateTimeZone.forID( "Europe/Paris" );
DateTimeZone zoneKolkata = DateTimeZone.forID( "Asia/Kolkata" );
DateTime nowUtc = DateTime.now( DateTimeZone.UTC );
DateTime nowParis = now.withZone( zoneParis );
DateTime nowKolkata = now.withZone( zoneKolkata );
Joda-Time and java.time both parse and generate strings in ISO 8601 format by default.
String output = nowUtc.toString();
If required, convert to java.util.Date.
java.util.Date date = newUtc.toDate();