I have Java 8 Spring web app that will support multiple regions. I need to make calendar events for a customer location. So lets say my web and Postgres server is hosted in MS
TLDR:
To convert from LocalDateTime to ZonedDateTime the following code. You can use .atZone( zoneId )
, a comprehensive list of zoneIDs are found in the column TZ database name
on Wikipedia.
LocalDateTime localDateTime = LocalDateTime.parse( "2016-04-04T08:00" );
ZoneId zoneId = ZoneId.of( "UTC" ); // Or "Asia/Kolkata" etc.
ZonedDateTime zdt = localDateTime.atZone( zoneId );