The java.util.Date toString() method displays the date in the local time zone.
toString()
There are several common scenarios where we want the data to be printed in
Why not just use java.text.SimpleDateFormat ?
Date someDate = new Date(); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); String s = df.format(someDate);
Or see: http://www.tutorialspoint.com/java/java_date_time.htm