Java Data Type How to - Count the duration between date time in two timezones


We would like to know how to count the duration between date time in two timezones.


/*from  w  w w . j  a v a  2s. c o  m*/
import java.time.Duration;
import java.time.ZoneId;
import java.time.ZonedDateTime;

public class Main {
  public static void main(String[] argv) {
    ZonedDateTime here ="America/Los_Angeles"));
    ZonedDateTime gmtNewYear = ZonedDateTime.of(2014, 12, 31, 23, 59, 59, 0, ZoneId.of("Europe/London"));

    Duration d = Duration.between(here, gmtNewYear);

The code above generates the following result.