java.time.Instant.minus(TemporalAmount amountToSubtract)


java.time.Instant.minus(TemporalAmount amountToSubtract)

package com.codingdict;

import java.time.Instant;
import java.time.Duration;

public class InstantDemo {
   public static void main(String[] args) {

      Instant instant = Instant.parse("2017-02-03T10:37:30.00Z");
      Duration duration = Duration.ofHours(5);
      Instant result = instant.minus(duration);
      System.out.println(result);  
   }
}