Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. String input = "2019-06-18T19:04:30.515 UTC".replace( " UTC" , "Z" ) ;
  2. Instant instant = Instant.parse( input ) ;
  3.  
  4. ZoneId z = ZoneId.of( "Pacific/Auckland" ) ; // Or "Europe/Berlin" etc.
  5. ZonedDateTime zdt = instant.atZone( z ) ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement