Skip to content

Commit

Permalink
Fix timezone generator for DateTimeOffset (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-g authored and kurtschelfthout committed Oct 17, 2018
1 parent b0635ad commit 4190cef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/FsCheck/Arbitrary.fs
Original file line number Diff line number Diff line change
Expand Up @@ -776,9 +776,9 @@ module Arb =
/// A DateTimeOffset is shrunk first by shrinking its offset, then by removing its second, minute and hour components.
static member DateTimeOffset() =
let genTimeZone = gen {
let! hours = Gen.choose(-14, 14)
let! minutes =
if abs hours = 14 then
let! hours = Gen.choose(-12, 14)
let! minutes =
if hours = -12 || hours = 14 then
Gen.constant 0
else
Gen.choose(0, 59)
Expand Down

0 comments on commit 4190cef

Please sign in to comment.