Date Format doesn't seem to be working

Hi guys

I am running the latest version of suite CRM 7.9.7 and even though i have set the date format in settings it doesn’t reflect this when adding new candidate/employee, i added a new date field but its still looking at the original format of 2017.10.23 where i wanted it as 23.10.2017.

I have checked settings and i have the new format of 23.10.2017 selected and i have run a repair and cleared cache etc but still not working.

Any idea’s??

Many thanks

Check timezones and formats in PHP settings (php.ini) and MySQL settings.

Hi and thanks for the response, I have spent alot of time on this, this evening and still no joy. I have contacted Godaddy Support and not very helpful, so far i have created a custom php.ini file and edited the following:-

Defines the default timezone used by the date functions
date.timezone = “Europe/London”

date.default_latitude = 51.500181
date.default_longitude = -0.12619

I have then killed all processes in cpanel and in suitecrm selected repair and rebuild and still not happening. I am kind of out of my depth here as very new to all this so any simple steps would be appreciated. In relation to Mysql settings, i dont have a clue on where to look…

Thanks for your help its much appreciated.


Do you get this problem only in a custom field (you say you added a date field to Employee module) or in other places in the system also?

One of the places i would ask you to check is in Admin / Schedulers, do the times there appear correct? For example, a job that is supposed to run every hour, did it run correctly in the past hour?

Hi pgr

I have checked and its showing the incorrect format across the whole site, including schedulers. I am starting to think it may be a bug as no matter what i do it wont change :S

It is common for people to have trouble configuring their PHP, especially in shared hostings, because the hosting enforces restrictions and sometimes it takes a while to understand what’s going on.

You have to make sure your php.ini settings are taking effect. I suggest using the Admin / Diagnostics / screen, get the phpinfo output and check the date.timezone values.

If your setting isn’t there, ask your hosting how to change it effectively.

The settings for cron jobs might be made in a different place.

Hi Pgr

I have followed your advice and run diagnostics. After checking the php.ini file i see that the timezone is set as UTC and not my correct timezone of GMT. I did make a custom php.ini file in my /public_html folder on cpanel (shared hosting godaddy) i then killed the processes running and refreshed everything but didnt work.

When you place the custom php.ini file, im assuming that this automatically becomes active, or not? if not how do i point it at it? I suppose the only assumption i can make at this time is that godaddy have restricted it. However on there support pages they do help you make your own custom php.ini so taking that into account, which i followed the process is maybe activating that file?

Thanks again for your help

Yes, that is a Hosting question, you’ll have to follow their tutorials or ask them for help.

If they are really problematic, you can always (apart from changing hosting!) try doing an ini_set or a date_default_timezone_set in the beginning of index.php (though it won’t be upgrade-safe, you’ll have to pay attention when upgrading). Google for examples.

For cron, I sometime suggest doing it from the command-line, but I never got feedback telling me if it worked. You pass php an option like this

-d date.timezone="Europe/London"

You can also try setting the option via .htaccess file.

As you see, there are many ways, all of them you can search online for details. But GoDaddy should be making this easier for you…