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

Wrong time in entry for multisite #2761

Closed
jeffreyschmitz87 opened this issue Apr 17, 2018 · 2 comments
Closed

Wrong time in entry for multisite #2761

jeffreyschmitz87 opened this issue Apr 17, 2018 · 2 comments

Comments

@jeffreyschmitz87
Copy link

Description

When you create an entry in a multisite, save it and the timezone in the general settings is not UTC, the time is wrong when you edit the entry.

Steps to reproduce

  1. Have a multisite
  2. Set timezone to UTC+2 (CEST) – Europe/Amsterdam
  3. Create an entry and hit save
  4. Open the saved entry and the time is the current time -2 hours
  5. Save the entry again with the wrong time and open it again. The time is -2 hours again

Additional info

  • Craft version: 3.0.2
  • PHP version: 7.0.23
  • Database driver & version: MySQL 5.5.5
@brandonkelly
Copy link
Member

I’m not able to reproduce this on my end. Any chance we can get admin/FTP access to your site? If so please reach us at [email protected] and we can help you from there.

brandonkelly added a commit that referenced this issue Apr 26, 2018
@brandonkelly
Copy link
Member

Issue ended up being that there was a custom module that was getting bootstrapped, and the module’s init() method was loading Twig. So Twig was getting loaded and initialized with the UTC timezone before Craft had a chance to set itself to the system timezone. Fixed by setting the system timezone before any modules get bootstrapped.

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