Problem with date() when export PDF (PROD)

Hi,

I encounter a problem in PROD, on exporting PDF from grid. Here is the error:

Warning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in C:\www\itsolution\htdocs\rep_grid_tasks\rep_grid_tasks_iframe.php on line 146

Generated code in the aforementioned file:


145| $NM_pdfbase = (isset($_SESSION['sc_session'][$aParams['script_case_init']]['rep_grid_tasks']['pdf_name'])) ? $_SESSION['sc_session'][$aParams['script_case_init']]['rep_grid_tasks']['pdf_name'] : 'sc_pdf_' . date('YmdHis') . '_' . rand(0, 1000) . '_rep_grid_tasks.pdf';
146| $NM_tit_doc = (isset($_SESSION['sc_session'][$aParams['script_case_init']]['rep_grid_tasks']['pdf_name'])) ? $_SESSION['sc_session'][$aParams['script_case_init']]['rep_grid_tasks']['pdf_name'] : "rep_grid_tasks.pdf"; 

How can I fix this? Should I edit each and every one of the grid iframe php files? I have set the production environment PHP timezone. And there is no problem with the function date() in other pages. Also no problem when exporting in development.

Thanks and regards,

One possibility: https://www.a2hosting.com/kb/developer-corner/php/using-php-directives-in-custom-htaccess-files/setting-the-php-time-zone-in-an-htaccess-file