src/Pure/General/date.scala
changeset 69980 f2e3adfd916f
parent 65733 45b8446a8b52
     1.1 --- a/src/Pure/General/date.scala	Mon Mar 25 16:11:28 2019 +0100
     1.2 +++ b/src/Pure/General/date.scala	Mon Mar 25 16:45:08 2019 +0100
     1.3 @@ -75,6 +75,9 @@
     1.4  
     1.5    /* date operations */
     1.6  
     1.7 +  def timezone_utc: ZoneId = ZoneId.of("UTC")
     1.8 +  def timezone_berlin: ZoneId = ZoneId.of("Europe/Berlin")
     1.9 +
    1.10    def timezone(): ZoneId = ZoneId.systemDefault
    1.11  
    1.12    def now(zone: ZoneId = timezone()): Date = new Date(ZonedDateTime.now(zone))
    1.13 @@ -91,7 +94,6 @@
    1.14      new Date(ZonedDateTime.of(rep.toLocalDate, LocalTime.MIDNIGHT, rep.getZone))
    1.15  
    1.16    def to(zone: ZoneId): Date = new Date(rep.withZoneSameInstant(zone))
    1.17 -  def to_utc: Date = to(ZoneId.of("UTC"))
    1.18  
    1.19    def unix_epoch: Long = rep.toEpochSecond
    1.20    def instant: Instant = Instant.from(rep)