title: Java Instant's bug? `DateTimeException: Invalid value for Year`
body: <p>According to the <a href="https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html" rel="nofollow noreferrer">documentation for Instant</a>, the minimum Instant is <code>-1000000000-01-01T00:00Z</code>, so the year is <code>-1000000000</code> and the timezone is <code>UTC</code>. so I expected this program to work, and the <code>atOffset</code> to be a noop:</p>
  
  <pre class="lang-java prettyprint-override"><code>import java.time.*;
  
  public class A {
     public static void main(String[] args) {
        Instant i = Instant.MIN;
        System.out.println(i);
        System.out.println(i.atOffset(ZoneOffset.UTC));
     }
  }
  </code></pre>
  
  <p>But instead it throws this exception on the <code>atOffset</code>:</p>
  
  <pre><code>-1000000000-01-01T00:00:00Z
  Exception in thread "main" java.time.DateTimeException: Invalid value for Year (valid values -999999999 - 999999999): -1000000000
          at java.time.temporal.ValueRange.checkValidIntValue(ValueRange.java:330)
          at java.time.temporal.ChronoField.checkValidIntValue(ChronoField.java:722)
          at java.time.LocalDate.ofEpochDay(LocalDate.java:341)
          at java.time.LocalDateTime.ofEpochSecond(LocalDateTime.java:422)
          at java.time.OffsetDateTime.ofInstant(OffsetDateTime.java:328)
          at java.time.Instant.atOffset(Instant.java:1195)
          at A.main(A.java:7)
  </code></pre>
  
  <p>Is that a bug? According to that validation's message the minimum year is <code>-999999999</code> but the documentation says it is <code>-1000000000</code>.</p>