We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88d8e9f commit 1b3b928Copy full SHA for 1b3b928
src/java_time/zone.clj
@@ -35,11 +35,6 @@
35
(fn [^CharSequence s, ^ZoneOffset zo]
36
(ZoneId/ofOffset s zo)))
37
38
-(conversion! Number ZoneOffset
39
- (fn [n]
40
- (let [[h m s] (to-hms n)]
41
- (ZoneOffset/ofHoursMinutesSeconds h m s))))
42
-
43
(defn- ^ZoneOffset clock->zone-offset [^Clock c]
44
(-> (.getZone c)
45
(.getRules)
@@ -68,7 +63,10 @@
68
63
69
64
(number? o)
70
65
(let [[h m s] (to-hms o)]
71
- (zone-offset h m s))))
66
+ (zone-offset h m s))
67
+
+ :else (throw (java.time.DateTimeException.
+ (format "Could not convert %s to a ZoneOffset!" o)))))
72
([h m] (ZoneOffset/ofHoursMinutes h m))
73
([h m s] (ZoneOffset/ofHoursMinutesSeconds h m s)))
74
0 commit comments