fake-rs icon indicating copy to clipboard operation
fake-rs copied to clipboard

Add chrono_tz support

Open dfaust opened this issue 2 years ago • 1 comments

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.

dfaust avatar Oct 17 '22 18:10 dfaust

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.

llogiq avatar Oct 18 '22 06:10 llogiq

@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>?

kyrias avatar Feb 03 '23 16:02 kyrias