Calendar not using correct user or system timezone

When I open a task on the calendar it shows the date/time in the GMT timezone and not in the timezone
that I have set (on my PHP server and in the User account in SuiteCRM). When I close the task it moves it to the wrong time.

I am using SuiteCRM 8.1.0, php v8.0 and MySQL v8.0.28

If you go in Admin / Diagnostics and get phpinfo form there, does the effective timezone show correctly?

Hi. I ran diagnostics and got the phpinfo. The date information contains the correct timezone but I don’t know where to check the date formatting. See below:

date/time support enabled
timelib version 2020.03
“Olson” Timezone Database Version 2021.5
Timezone Database internal
Default timezone Australia/Perth

The property that counts is a little bit below that, it’s called date.timezone

But let’s assume it is correct.

Are you technical enough to get a look at the database via phpMyAdmin, for example?

It is the same.

date

date/time support enabled
timelib version 2020.03
“Olson” Timezone Database Version 2021.5
Timezone Database internal
Default timezone Australia/Perth
Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.833333 90.833333
date.sunset_zenith 90.833333 90.833333
date.timezone Australia/Perth Australia/Perth

Yes I can access phpmyadmin

You could try seeing how the record gets saved in the database, then. Basically, I think this could be a bug, but it’s useful to know when the bug is happening. Is it saving the date wrong in the database? Or is it displaying it wrong, after retrieving it from the database?

Note that SuiteCRM always stores the dates in MySQL using the UTC timezone GMT-0, so check that it is saving the correct equivalent to what you type, converted to that timezone.

Hi. The database Task table entry is showing the UTC time as expected, and the calendar shows the correct time, however when you open the task (view task) it is displaying the UTC time and not the local time. See the pictures below…

Database “Task” table entry:

Calendar view of task showing correct (local) time (UTC +8):

After clicking on the item in the Calendar (shows local time):

After clicking the “View Task” button, the time is displayed as UTC NOT local time.

Your screenshots and database troubleshooting will make a perfect bug report! :smiley:

Please open that here:

Same as

1 Like

Ok, but I still think the screenshots help. They help a developer get curious and start itching to find out what is going on…

Did we got any solution?

Looks like this work for others:

This solution + you need to set UTC to 0 on SuiteCRM