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

Replace Hardcoded 'UTC' Timezones with Environment Variable (If possible) #2038

Closed
moorl opened this issue Aug 25, 2021 · 3 comments
Closed

Comments

@moorl
Copy link

moorl commented Aug 25, 2021

Please describe the feature you would like to see implemented.

For example I want to calculate if a store is open to given opening hours serverside, there are always problems with the timezone.

I would have simple solution for it:

  • Add a Environment Variable: SHOPWARE_TIMEZONE=Europe/Berlin
  • Replace 'UTC' with getenv('SHOPWARE_TIMEZONE')

I have seen, there are many hardcoded 'UTC' in the Core, so it would be hard to build in a system_config?

Anyway, if the suggested solution works, it would be fine.

@shyim
Copy link
Member

shyim commented Aug 25, 2021

What does solve that for you? The system timezone is Berlin then and? 😄 It makes no difference to have Berlin / what ever timezone. The timezone needs on each time calculated / printed to the customer timezone / where it will be shown.

For the admin user, it will be controlled by https://github.com/shopware/platform/blob/trunk/src/Core/System/User/UserDefinition.php#L90

The storefront will be controlled by
https://github.com/shopware/platform/blob/d6c853ca3b6b167d61d70e6329f4fcface5c5245/src/Storefront/Resources/app/storefront/src/utility/timezone/timezone.util.js#L15-L19

@dennishei
Copy link

It makes a difference if you want to analyze log files for example....
Example: prod-2021-09-06.log

@shyim
Copy link
Member

shyim commented Oct 14, 2021

@dennishei That should be a custom option of monolog symfony/monolog-bundle#419

I am closing this as its inactive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants