Skip to content

timezone() respects countrycode#607

Merged
pimjansen merged 2 commits intoFakerPHP:mainfrom
jefhar:jefhar/bugfix-country-timezones
Mar 11, 2023
Merged

timezone() respects countrycode#607
pimjansen merged 2 commits intoFakerPHP:mainfrom
jefhar:jefhar/bugfix-country-timezones

Conversation

@jefhar
Copy link
Copy Markdown

@jefhar jefhar commented Feb 25, 2023

https://github.com/FakerPHP/Faker/pull/480/files added optional countryCode parameter, to Core and Extension classes, but not the Provider class.

What is the reason for this PR?

Duplicate existing functionality into Provider\DateTime class

Author's checklist

Summary of changes

Duplicate existing functionality into other class.

Review checklist

  • All checks have passed
  • Changes are approved by maintainer

https://github.com/FakerPHP/Faker/pull/480/files added optional countryCode parameter, to Core and Extension classes, but not the Provider class.
@pimjansen
Copy link
Copy Markdown

Im not a fan of this since a method should be clear what it does.

However i do like the feature which we can maybe implement in a seperate method instead. @bram-pkg thoughts?

@bram-pkg
Copy link
Copy Markdown
Member

I think this is fine, as long as it's documented in the docblock and in fakerphp.github.io.

@jefhar
Copy link
Copy Markdown
Author

jefhar commented Mar 11, 2023

@bram-pkg The documentation already shows that timezone() takes an optional country code. The original PR missed this implementation.

@pimjansen pimjansen merged commit 275f172 into FakerPHP:main Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

timezone() does not respect country code

3 participants