UTC_Timestamp different from System Time

I noticed that when Mautic writes to the database it uses UTC_Timestamp and not system time.
What this does is write the time/date differently from both mysql now() time and system time.

This campaign has three events scheduled:

Inside the DB it is written that the campaigns are scheduled at 12:40, 13:40 and two days later at at 12.
However inside the campaign it is set to 3 hours later.

Inside mysql this is the output I see and it looks like UTC_Timestamp is the culprit

This does not break any campaign and things still go out at the correct hour, however when doing direct queries on the database for internal scripting etc… we are getting false information.

Does anyone have any clue on how to fix this ?


mautic (or any app really) should store date and time in utc because otherwise it complicates things when you try to represent the same data to the users worldwide.

When using the scripts read the timezone info from app/config/local.php - key default_timezone and calculate the “valid” time based on the offsets.

1 Like