Java tutorial
import java.time.Duration; import java.time.ZoneId; import java.time.ZonedDateTime; public class Main { public static void main(String[] argv) { ZonedDateTime here = ZonedDateTime.now(ZoneId.of("America/Los_Angeles")); ZonedDateTime gmtNewYear = ZonedDateTime.of(2014, 12, 31, 23, 59, 59, 0, ZoneId.of("Europe/London")); Duration d = Duration.between(here, gmtNewYear); System.out.println(d); } }