Hi everyone, as per the title, I have a problem with the timezone.
I created a new custom module and when I create a new record, the creation time is incorrect.
In phpmyadmin there is a difference of a couple of hours, this also causes problems when importing data, the times are changed.
The SuiteCRM Timezone is correct, also in php.ini it is correct, I also set the timezone from code before saving, but it does not work.
I printed the times on the screen before saving and they were correct, after saving they are transformed.
Thinking that the problem was phpmyadmin (because the data_created etc. are incorrect), I ran inside it:
SELECT now()
and the time displayed is correct.
I no longer know what to check or change to solve the problem, does anyone have any ideas please? Thanks.
See the timezone setting as shown in Admin / Diagnostics / phpinfo. This will confirm the effective setting in your web server. If it doesn’t match, that same information will guide you to the correct php.ini (there can be more than one).
If your records are created in “on scheduler workflows”, that is not going through the web server, but through the CLI PHP. That’s a different php.ini, you can learn about this from the command-line:
@scicali is right, I didn’t realize you were asking about how the value is in the database. In there, it’s always UTC and should be. Which is fine, as long as it shows correctly (according to user profile timezone) to each user when it is displayed.
Remember that a company can have users accessing the CRM from multiple timezones.
this is the problem, to make it work I had to set the SuiteCRM timezone to UTC, instead of setting it to my timezone because otherwise it is off by a couple of hours