time issue

Hi, I am having an issue with timestamps in the database. Whenever I create the case, date_created and date_modified columns in the database are 4 hours ahead.
How could I remove that 4 hours difference in database ?

In the database the times are saved as GMT, this is by design. Remember SuiteCRM needs to be ready to work with people across timezones, so something had to be implemented to manage time differences.

It’s really not a good idea to try and change that, you’ll get yourself into loads of trouble.

I am having this issue in Cases module. It’s timestamps Date_created and Date_modified fields are 4 hours ahead. So when I attach file after creating case. Time contradicts it.

So your issue is not in the database, but in the UI?

Check your php.ini settings for timezone. You have 2 php.ini’s to change: one for your web server, one for CLI (affects shceduler jobs).

Your web server php.ini path can be retrieved from Admin / Diagnostic, phpinfo option.

You CLI path can be obtained from the command-line with

php -i | grep php.ini

I have checked php.ini. It’s by default America/Newyork

That’s a very short answer for the complexity of this…

  • Are you talking about CLI or web server?

  • Are you talking about the value in php.ini or the effective value as it appears in the output of phpinfo, for each of those two?

Yes. I am talking about the php.ini of web server.

I’m not sure I follow you.

So you create a Case at 8am. It gets stored on the database as 4am, which is correct because that’s GMT.

But it should still show as 8am on your UI, does it?

What do you mean about attaching files?

Thanks for Help. I got solution.