i have an issue skipping the time-zone using calendar. My problem sounds like this : I have an event starting "x" date and i have to add hours but not changing the clock time. For example if my event its 2019-03-09 22:46:00 and i add 2400 hours (100 days) , my output will be "2019-06-17 23:46:00" because of time-zone changing. I need my out put to be 2019-06-17 22:46:00. How can i make that using calendar ? calendar = my first event date calendar2 = the date after i need to return my next event by adding hours to first calendar.
while (calendar.compareTo(calendar2) < 0) {
calendar.add(Calendar.HOUR_OF_DAY, nr_hours);
}
nextEvent =sdf.format(calendar.getTime());
return nextEvent;