Given that you need a Unix timestamp "given LocalDateTime , in UTC", the easiest way is to simply convert it to DateTime by specifying DateTimeZone for UTC and convert this:
LocalDateTime local = new LocalDateTime(2015, 10, 02, 11, 31, 40); DateTime utc = local.toDateTime(DateTimeZone.UTC); long secondsSinceEpoch = utc.getMillis() / 1000;
Note the use of seconds here as a Unix timestamp - other APIs (like java.util.Date ) can expect milliseconds from the Unix era.
Jon skeet
source share