Mautic publish based on UTC timezone not our local timezone

We noticed that whenever we publish, it would send off the email prematurely and we suspect it sending off email based on UTC timezone not based on our local timezone.

We do have php.ini set up with our local timezone since we have other php scripts on server using it with correct timezone. Did this bug appeared in latest version or did we accidentally set something incorrectly in Mautic?

Using 8.0 php here a screenshot of our timezone set in php.in from Mautic system info

Which timezone is Mautic using to based off of? Server, MySQL or PHP?

Thank you.

Something is very off with Mautic on timezone …

I have other domains and when I did a php info lookup on other domain which is using the same php as Mautic … the timezone seems to be correct on it

See screenshot from another domain using same php as Mautic

Noticed the [Default timezone] is America/Chicago and [date.timezone] is also America/Chicago

And on Mautic php info (see screenshot in previous thread) is showing that [Default timezone] is UTC and [date.timezone] is America/Chicago

I recently updated my Mautic to 4.4.10 and I wondered if a bug on timezone got introduced with the update? All my other website on same server as Mautic are showing the correct timezone in php info while Mautic is showing that one timezone is UTC while other is showing America/Chicago

How do I fix this or is this a bug introduced into 4.4.10?

Thank you

And yes the timezone was already set in Mautic configuration as shown in screenshot below

Mautic is setting the timezone in multiple places via PHP: date_default_timezone_set - Manual

See the occurrences:
https://github.com/search?q=repo%3Amautic%2Fmautic%20date_default_timezone_set&type=code

But it’s nothing new.

PHP also have different ini config files for the web requests and for CLI. Check if the problem isn’t in the CLI ini file.

We think it a bug introduced in 4.4.10

We already check all php.ini and issue this command in CLI on server

root@server.247ag.org [~]# php -i | grep "date.timezone"
date.timezone => America/Chicago => America/Chicago

And Mautic still using UTC as default timezone to send out email but there calendar in Mautic when opened is showing the correct timezone

Something broke somewhere and we been using same server that Mautic resides on for years.

CLI showing correct timezone … see previous post.

Let me rephrase my question in this thread …

Where is Mautic getting the default timezone as shown in its’ own php info?

It’s not from php CLI for sure because we already checked all php.ini and we even check the php on the sub-domain on same server which is showing the correct “Chicago” timezone. (see screenshot below php info on a different sub-domain on same server) . We can clearly see that both have the correct “Chicago” as the default timezone while Mautic is showing as UTC in its’ own php info.

Try this using .htaccess and see if this does anthing.

It gave us an internal server error. I believe I did tried those and no luck.

I do have root access to the server system and tried a bunch of stuff but still stubbornly show UTC on Mautic while other php scripting shows the proper Chicago timezone as it is set in php configuration …

It’s on the same OS server system but on different domains while other php scripts show the proper timezone as configured in php.ini or other settings etc

… that kind of point to Mautic .

Who is your hosting provider, are you on a shared platform, or VPS, Semi-Dedicated or Dedicated Hosting. Sometimes you end up with crapy hosting and not all servers are created equal for hosting and having open source software used on them. There are a lot of variables. Have you tried to delete Mautic all together along with a new database and started a new install.

My hosting it’s a simple 1 click install of Mautic and it works every single time for things to start working because the hosting I have focuses on making 100s of apps created for 1 click installs to get you off the ground.

I am running dedicated server under Bluehost who provide the backbone to it. I mantain more than one dedicated server across the country and on all of it I use WHM / cPanel for my clients but I also do lot maintaining via terminal.

I don’t think who provide the backbone to my dedicated server is relevant to this issue because I been using Mautic for over a year now on same dedicated server then after I upgrade to 4.4.10 that when this issue popped up when staff members informed me of this issue which didn’t happened in the past.

Not to confuse anyone, I maintain an large organization dedicated server for them and I also maintain several other dedicated server for other clients as well too. All are running them same OS CentOS7 and WHM / cPanel but all are under different hosting provider depending on clients.

I am plan on going back to 4.4.7 to see if it fixes this issue because a staff member just emailed me that they encountered another different bug on Mautic so I am just hoping to see if this issue can be fixed or corrected without going back to older version.

You do know you can downgrade to the version you had before this issue and wait.

How to Downgrade Mautic - Autoize.

I use composer to install Mautic.

I restored the backup from 4.4.7 and the email is being sent out the timezone we assigned to it instead of UTC timezone.

Clearly, something broke between 4.4.8 to 4.4.10 since going back to 4.4.7 fixes my timezone issue.

I"m waiting for version 5 to even use composer I have seen to many problems with any version of 4.x.x of Mautic with Composer, I have the regular install and it’s worked amazing for me. Never had an issue, so I wouldn’t doubt that something has an issue with the update because of the composer. Sorry your having these issues. and I would stay on the working version you have with 4.4.7

1 Like

I manage 4 Mautic instances 4.4.10 and all of them are working ok.

As a guide, I let the debian time zone unchanged (UTC).

And only in Mautic I customize the time zone. I change nothing in php or anywhere else.

1 Like

I manage Mautic on CentOS and it always been working for me with server set at UTC timezone until I updated Mautic then timezone in Mautic was off so I fiddled with the server, and php even MySQL but it was still sending out on UTC timezone ignoring the timezone I had set in the Mautic setting.

Reason I rolled back because we had Mautic for over a year now I believe and it is a reliable marketing or newsletter scripting for us so I felt it was something in the newer version after fiddling with the server configuration. First, I restored my server configuration back to what it was and confirmed timezone was still at UTC then restored to the previous version which fixed it without touching anything else.

Maybe something corrupted during the composer update and if I update it again that it may work and be fine this time.

I am always testing version or update when there a bug I discovered. Normally, I would have duplicated my current Mautic on an another server with same spec and tested it before updating the production one however I didn’t have time to all this task and again Mauitic is a reliable software so I just assume all is good when I ran composer update. …

Nothing againist Mautic at all, we love it here in our organization. Just wanted to share what we experienced after updating to 4.4.10.

I spot a difference, but cannot tell if it could be relevant: I do not use composer install.

1 Like

Post where you spot a difference on my issue ticket for timezone over at Default timezone stuck on UTC · Issue #12823 · mautic/mautic · GitHub. They will most likely tell if it relevant or not.