I want to set up joda DateTime
to today at 2 AM (see sample code below). But I\'m getting this exception:
Exception in thread \"main\" org.joda.
If you need to parse date from string:
final DateTimeZone dtz = DateTimeZone.getDefault(); //DateTimeZone.forID("Europe/Warsaw")
LocalDateTime ldt = new LocalDateTime("1946-04-14", dtz);
if (dtz.isLocalDateTimeGap(ldt)){
ldt = ldt.plusHours(1);
}
DateTime date = ldt.toDateTime();
Date date = date.toDate();
Worked for me perfectly. Maybe somebody will need it.