fake-rs
fake-rs copied to clipboard
Add chrono_tz support
Add a new feature chrono-tz
and impl Dummy
for chrono_tz::Tz
.
A random timezone is selected from the list of all timezones provided by chrono_tz.
I wasn't sure about the determinism tests, so I skipped them.
The determinism tests ensure that with the same rng
input, you get the same results.
We had cases in the past where random iteration order of hash maps had indeterminism creep in.
@cksac Any timeline on when the next release will be made? I could rather use the new chrono_tz
support. :)
Edit: Ah, though I just realized that this PR isn't enough to cover my usecase, because I need DateTime<chrono_tz::Tz>
.
What do you think about instead of explicitly implementing it for every supported timezone, if we instead implement Dummy<Faker> for DateTime<T> where T: TimeZone + Dummy<Faker>
?