[Solved] How to get time from user with respect to timezone

String userTimeZone = “Asia/Samarkand”; String userDate = “2018-07-05”; ZoneId zone = ZoneId.of(userTimeZone); Instant dbInstant = LocalDate.parse(userDate) .atStartOfDay(zone) .toInstant(); System.out.println(dbInstant); This prints what you had expected: 2018-07-04T19:00:00Z I don’t know MongoDB’s JDBC driver, but I assume it would be happy to accept an Instant and store it in UTC in the database. GMT+05:00 is not really … Read more