Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datatype.datetime seed might not be working #334

Closed
pkuczynski opened this issue Jan 28, 2022 · 2 comments · Fixed by #343
Closed

datatype.datetime seed might not be working #334

pkuczynski opened this issue Jan 28, 2022 · 2 comments · Fixed by #343
Assignees
Labels
c: bug Something isn't working p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug

Comments

@pkuczynski
Copy link
Member

pkuczynski commented Jan 28, 2022

Describe the bug

There was this comment in the jsdoc

faker/src/datatype.ts

Lines 92 to 98 in 60b71fd

* Returns a Date object using a random number of milliseconds since 1. Jan 1970 UTC
* Caveat: seeding is not working
*
* @method faker.datatype.datetime
* @param options pass min OR max as number of milliseconds since 1. Jan 1970 UTC
*/
datetime(

We are not sure if this is true or not, however this method relies underneath on datatype.number which might be also affected.

Discussed here: https://discord.com/channels/929487054990110771/929544761122111498/936559737540071434

Reproduction

Needs investigation

Additional Info

No response

@pkuczynski pkuczynski added s: pending triage Pending Triage c: bug Something isn't working labels Jan 28, 2022
@github-actions github-actions bot removed the s: pending triage Pending Triage label Jan 28, 2022
@Shinigami92 Shinigami92 added this to the v6.1 - First bugfixes milestone Jan 28, 2022
@import-brain import-brain added the help wanted Extra attention is needed label Jan 28, 2022
@github-actions
Copy link
Contributor

Hello @pkuczynski. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it!

@ST-DDT
Copy link
Member

ST-DDT commented Jan 29, 2022

I could confirm that datetime does not work as expected. However it is not related to the seeding. Instead it is related to dynamic bounds. datatype.number is explicitly not affected and works as expected.

See #343 for the cause and fix.

@ST-DDT ST-DDT added p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug labels Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants