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

Should we add Site timezone as a prompt? #158

Open
stevepiercy opened this issue Feb 12, 2025 · 1 comment
Open

Should we add Site timezone as a prompt? #158

stevepiercy opened this issue Feb 12, 2025 · 1 comment
Labels

Comments

@stevepiercy
Copy link
Contributor

You can create a project with Cookieplone, and never set the site's timezone, leaving it to use the default of UTC.

Image

Neither frontend displays a warning or reminder to set the server's timezone.

After generating a project via Cookieplone, if you create another site for either Volto or Classic UI, you must set the Plone site's timezone.

Image

We could use zoneinfo.available_timezones() to grab a list of timezones as options, but it would be a challenge to implement in the command line UI. Validation of the input would be a challenge as well.

@davisagli
Copy link
Member

Cookieplone does not directly create a Plone site. It generates a Makefile which includes commands to create a Plone site. Then the Makefile is committed to a repository and multiple people in different timezones will use the commands to create their own Plone site. So, it doesn't make sense to include timezone in the cookieplone template prompts.

The actual site creation is done using the create_site.py script which currently has the timezone hardcoded as UTC. (https://github.com/plone/cookieplone-templates/blob/main/backend_addon/%7B%7B%20cookiecutter.__folder_name%20%7D%7D/scripts/create_site.py#L55, https://github.com/plone/cookieplone-templates/blob/main/sub/project_settings/%7B%7B%20cookiecutter.__folder_name%20%7D%7D/backend/scripts/create_site.py#L53). We should update that to try to get the current timezone of the machine where the site is being created.

I will transfer this issue to cookieplone-templates since it's a limitation of specific templates and not Cookieplone in general.

@davisagli davisagli transferred this issue from plone/cookieplone Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants