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

Store actual System TZ (not Ansible's ambiguous TZ abbreviations) into fpm/php.ini & cli/php.ini — for Matomo etc #3453

Merged
merged 2 commits into from
Dec 30, 2022

Conversation

holta
Copy link
Member

@holta holta commented Dec 30, 2022

@cwivagg this PR should finally fix the Time Zone in Matomo (as well as providing better TZ hygiene for all of IIAB's PHP-based apps). LMK please if you discover quirks on VirtualBox or anywhere!

It works by bypassing Ansible's unhelpful TZ abbreviation mechanisms {ansible_date_time.tz, ansible_date_time.tz_dst, ansible_date_time.tz_offset} and instead using Linux's TZ directly (e.g. America/New_York, from symlink /etc/localtime and/or text file /etc/timezone — or the absence of both — which in fact means time zone UTC).

Thanks to the very hard work from many. Including @jvonau, @cwivagg and others..

FYI this PR also documents, clarifies and cleans up, e.g.:

  • Renaming www_options/tasks/set-php-limits.tml to www_options/tasks/php-settings.yml
  • Renaming flag var set_php_limits_done to php_settings_done

This PR was tested quite extensively on Debian 12's latest daily. It builds on:

@holta holta added this to the 8.0 milestone Dec 30, 2022
@holta
Copy link
Member Author

holta commented Dec 30, 2022

This PR is reconfirmed working well with a fresh install onto Multipass VM (Ubuntu 22.04). The correct TZ is shown after logging into http://box/matomo and then browsing to:

  • Administration > Websites > Manage > TIME ZONE
  • Administration > Websites > Settings > Default Time zone for new websites

( Above click-trails [Matomo 4.13.0 above] being a slight change from what's described at https://matomo.org/faq/how-to/faq_83/ )

@holta
Copy link
Member Author

holta commented Dec 30, 2022

More than an enhancement, this PR is basically a bug fix (i.e. Lines 27-39 of www_options/tasks/php-settings.yml) for IIAB's longstanding small issue with Matomo Time Zones.

Look good. Thanks all who can confirm.

@holta holta merged commit ef71e4f into iiab:master Dec 30, 2022
holta added a commit that referenced this pull request Dec 30, 2022
@jvonau jvonau mentioned this pull request Dec 30, 2022
@jvonau
Copy link
Contributor

jvonau commented Dec 31, 2022

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

Successfully merging this pull request may close these issues.

None yet

2 participants