How to replace Joda dateTime and interval with Java.time
I am trying to replace Joda datetime and interval methods with Java.time and also trying to specify explicitly timezone as Duser.timezone=America/Chicago. This my code fragment public void createMessage(userinfo,long start,long end){ Long startDateInMilliSec = start; Long endDateInMilliSec = end; DateTime startDateTime = new DateTime(start); DateTime endTimeForThisDay = startDateTime.plusDays(1).withMillisOfDay(0); Interval i = new Interval(startDateTime, endTimeForThisDay); ... } I replaced this way ZonedDateTime startDateTime = startInstant.atZone(ZoneId.of("America/Chicago")); Instant endIn
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.