blob: ab28a4dc7484fcf8e6f06634d72dbc03bdda63db [file] [log] [blame]
Clément Béra8310c372023-01-27 10:31:32 +01001// Copyright (c) 2023, the R8 project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5package newtime;
6
7import java.time.Clock;
8import java.time.LocalDate;
9import java.time.LocalTime;
10import java.time.OffsetTime;
11import java.time.ZoneId;
12import java.time.ZoneOffset;
13
14public class NewTimeMain {
15
16 public static void main(String[] args) {
17 Clock utc = Clock.tickMillis(ZoneId.of("UTC"));
18 System.out.println(utc.getZone());
19 OffsetTime ot = OffsetTime.of(LocalTime.NOON, ZoneOffset.UTC);
20 System.out.println(ot.toEpochSecond(LocalDate.MIN));
21 }
22}