Q: date is running in +5:30 i am using this in my Class 
@Required
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startDate;

@Required
@JsonFormat(pattern = "HH:mm:ss")
private Date startTime;

but when i passed
"startDate": "2015-06-26","startTime": "16:00:35"

from frontend and cast to object
then i see
Long start=obj.getStartDate().getTime()+obj.getStartTime().getTime();

System.out.println(new Date(start));
//Fri Jun 26 21:30:35 IST 2015

System.out.println(new Date(System.currentTimeMillis()));
//Fri Jun 26 18:50:27 IST 2015 

that its in +5:30  
i just want to test it is before the current time or not.
please suggest best practice.

A: If you don't need time zone information take a look at the LocalDateTime or if you need time zone info: ZonedDateTime class in the JAVA-8 or if you are using 7 or before look at the joda version

A: Correct Behavior
Your code is performing correctly (presumably, as you do not show all of it).
You specified a time of 16:00:35 which is then parsed (apparently) as UTC time zone. That Long object contains a count of milliseconds since epoch of 1970 in UTC.
When adjusted to India time zone, five and a half hours ahead of UTC, we correctly see 21:30:35 on same date.
Use A Decent Library
The old java.util.Date/.Calendar classes are notoriously troublesome. Avoid them.
To make life easier, learn to use a decent date-time library. In Java, that means either:


*

*java.time package built into Java 8 and later.

*Joda-Time library


Search StackOverflow for many many examples of either.
Avoid Time Zone Codes
Avoid using, or even thinking about, those 3-4 letter time zone codes. They are neither standardized nor unique. They further confuse Daylight Saving Time. By IST did you mean India Standard Time or Irish Standard Time or maybe Iran Standard Time?
Instead use only proper time zone names, in format of continent/city-or-region. For example, "Asia/Kolkata".
Pad Offset
You incorrectly stated the India time zone as +5:30. In an offset-from-UTC, the leading zero is not optional. India offset is +05:30. 
