Skip to content

Commit 4190cef

Browse files
eugene-gkurtschelfthout
authored andcommitted
Fix timezone generator for DateTimeOffset (#458)
1 parent b0635ad commit 4190cef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/FsCheck/Arbitrary.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,9 +776,9 @@ module Arb =
776776
/// A DateTimeOffset is shrunk first by shrinking its offset, then by removing its second, minute and hour components.
777777
static member DateTimeOffset() =
778778
let genTimeZone = gen {
779-
let! hours = Gen.choose(-14, 14)
780-
let! minutes =
781-
if abs hours = 14 then
779+
let! hours = Gen.choose(-12, 14)
780+
let! minutes =
781+
if hours = -12 || hours = 14 then
782782
Gen.constant 0
783783
else
784784
Gen.choose(0, 59)

0 commit comments

Comments
 (0)