Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DateFormatSampleCode {
- public static void main(String[] args)
- {
- LocalDateTime localDateTime = LocalDateTime.ofEpochSecond(1459123200, 0, ZoneOffset.UTC);
- System.out.println(localDateTime);
- localDateTime = localDateTime.minusDays(1);
- System.out.println(localDateTime);
- ZonedDateTime zonedDateTime = ZonedDateTime.of(localDateTime, ZoneId.of("Europe/Stockholm"));
- System.out.println(zonedDateTime);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement