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

Dynamically set timezone #363

Closed
turtle0x1 opened this issue Apr 29, 2021 · 2 comments
Closed

Dynamically set timezone #363

turtle0x1 opened this issue Apr 29, 2021 · 2 comments

Comments

@turtle0x1
Copy link

Description
Be able to set timezone either through an environment variable or by passing it as argument.

Example
I run crunz in SNAP container where files cant be edited, but users can be around the world so hard coding a timezone into the file is not an option, would it possible to read this variable from the environment or by passing it in?

Editing vendor/lavary/crunz/src/Task/Timezone.php to include the following works for me, buts its probably not very "symfony" (if I knew the symfony way id submit a merge request)

if (isset($_ENV['CRUNZ_TIMEZONE'])) {
    $newTimezone = $_ENV["CRUNZ_TIMEZONE"];
} else {
    $newTimezone = $this->configuration
        ->get('timezone')
    ;
}
@turtle0x1 turtle0x1 changed the title Dynamiclly set timezone Dynamically set timezone Apr 29, 2021
@turtle0x1
Copy link
Author

Whoops duplicate

@PabloKowalczyk
Copy link
Collaborator

Please see #328 - you can configure timezone per file. Global configuration needs PHP config files which i started to develop but not yet finished.

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

No branches or pull requests

2 participants