Small protest about parse() on time objects, the following is what it really takes to assure creation from String information that parse() methods continually reject !!!
bash-5.1$ javac ZoneParse.java
Note: ZoneParse.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
bash-5.1$ java ZoneParse
24 Dec 2021 13:00:00 GMT
bash-5.1$
It will be something alike the following if safe...
import java.time.*;
public class ZoneParse{
public ZoneParse(){
String[] dt = ("25/12/2021").split("/");
ZonedDateTime ztm = (LocalDate.of(new Integer(dt[2]).intValue(),new Integer(dt[1]).intValue(),new Integer(dt[0]).intValue())).atStartOfDay(ZoneId.systemDefault());
System.out.println((java.util.Date.from( (ztm.withZoneSameInstant((ZoneId)ZoneId.of("America/New_York")).toInstant()))).toGMTString());
}//enconstr
public static void main(String[] args){
new ZoneParse();
}//enmain
}//enclss
NOTE withZoneSameInstant() changes both the time and the zone.
withZoneSameLocal() only retags the time as belonging as another time zone
The updated time library since around java 8 is quicker
This following link is a library with some time assistance under construction avoids parse() as much as possible including a pair of methods of String fill in arguments to create a timedate.
https://drive.google.com/file/d/1gjHmdC-BW0Q2vXiQYmp1rzPU497sybNy/view?usp=share_link
The below erroneous code is because parse() is probably one of the WORST explained methods in the docs, it generally requires a few different pages each of different sections to get any explanation of how to use it.
ZonedDateTime ztm = ZonedDateTime.parse("25/12/2021");
Instant it = (ztm.withZoneSameInstant((ZoneId)ZoneId.of("America/New_York"))).toInstant();
java.util.Date date = java.util.Date.from(it);