Skip to content

Commit 6f66f3f

Browse files
authored
Start using java.time classes
Breaking changes
1 parent ca56570 commit 6f66f3f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • src/main/java/com/kosherjava/zmanim/util

src/main/java/com/kosherjava/zmanim/util/Time.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Zmanim Java API
3-
* Copyright (C) 2004-2025 Eliyahu Hershfeld
3+
* Copyright (C) 2004-2026 Eliyahu Hershfeld
44
*
55
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
66
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
@@ -15,14 +15,14 @@
1515
*/
1616
package com.kosherjava.zmanim.util;
1717

18-
import java.util.TimeZone;
18+
import java.time.ZoneId;
1919

2020
/**
2121
* A class that represents a numeric time. Times that represent a time of day are stored as {@link java.util.Date}s in
2222
* this API. The time class is used to represent numeric time such as the time in hours, minutes, seconds and
2323
* milliseconds of a {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour}.
2424
*
25-
* @author © Eliyahu Hershfeld 2004 - 2025
25+
* @author © Eliyahu Hershfeld 2004 - 2026
2626
*/
2727
public class Time {
2828
/** milliseconds in a second. */
@@ -209,6 +209,6 @@ public double getTime() {
209209
* @see java.lang.Object#toString()
210210
*/
211211
public String toString() {
212-
return new ZmanimFormatter(TimeZone.getTimeZone("UTC")).format(this);
212+
return new ZmanimFormatter(ZoneId.of("UTC")).format(this);
213213
}
214214
}

0 commit comments

Comments
 (0)