Do you absolutely have to use java.util.Date? I would thoroughly recommend that you use Joda Time or the java.time package from Java 8 instead. In particular, while Date and Calendar always represent a particular instant in time, with no such concept as "just a date", Joda Time does have a type representing this (LocalDate). Your code will be much clearer if you're able to use types which represent what you're actually trying to do.
There are many, many other reasons to use Joda Time or java.time instead of the built-in java.util types - they're generally far better APIs. You can always convert to/from a java.util.Date at the boundaries of your own code if you need to, e.g. for database interaction.
Do you absolutely have to use java.util.Date? I would thoroughly recommend that you use Joda Time or the java.time package from Java 8 instead. In particular, while Date and Calendar always represent a particular instant in time, with no such concept as "just a date", Joda Time does have a type representing this (LocalDate). Your code will be much clearer if you're able to use types which represent what you're actually trying to do.
There are many, many other reasons to use Joda Time or java.time instead of the built-in java.util types - they're generally far better APIs. You can always convert to/from a java.util.Date at the boundaries of your own code if you need to, e.g. for database interaction.
Here is what I used to get today's date with time set to 00:00:00:
DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
Date today = new Date();
Date todayWithZeroTime = formatter.parse(formatter.format(today));
Short answer, there is no such type in Java-8.
The combination of a calendar date and a time zone is questionable, at least to say. Reason is that time zones are intended to operate on date AND time. Since time zones are responsible for translating between global instants/moments and local timestamps (including date AND time) a combination of just a date and a zone is simply not complete to enable such transformations.
The only similar type I am aware of is the type
xs:date
in XML-Schema which explicitly allows an extra offset (which is less than a time zone because it does not store daylight saving rules or historical offsets). In my opinion the W3C-consortium has rather introduced this type for symmetry reasons not for real time-tasks. JSR-310 (which introduced the java.time-package into Java-8) originally intended to offer a similar type called OffsetDate, see also this page. It was removed however when Java-8 was finished for release.
Of course, you can write a simple class yourself which holds two state members of types LocalDate and ZoneId (but what is your use-case???). For XML, I would rather choose LocalDate and ZonalOffset.
Maybe you can use the class ZonedDateTime:
ZonedDateTime zonedDateTime = ZonedDateTime.now(ZoneId.of("Europe/Paris"));
LocalDate localDate = zonedDateTime.toLocalDate(); // gets you the date without time
ZoneId zoneId = zonedDateTime.getZone(); // gets you the timezone
You could use a Calendar to solve this:
Calendar cal = Calendar.getInstance();
cal.setTime(yourDate);
cal.set(Calendar.HOUR, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
Date desiredDate = cal.getTime();
The best thing is joda-time if you can use it.
Otherwise, use Calendar API. call Calendar.set() to set hour, minute, second and millisecond to zero then you have a Date of the starting of the date.
But, won't new DateTime().withTimeAtStartOfDay() be a much easier expression?