• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Plesk PHP date.timezone

Chris1

Regular Pleskian
Hello,

Does the Plesk PHP ini files set the date.timezone parameter automatically?

I only just enabled the server to synchronize with a NTP server via Tools & Settings > System Time, however I have a client getting a PHP warning:

Code:
PHP Warning:  date(): It is not safe to rely on the system's timezone settings.

I see that the date.timezone parameter is not set in /opt/plesk/php/5.X/etc/php.ini, will this automatically update given that I just configured the Plesk system time? Or is there a command I can run to make it sync now? Or do we have to update this parameter manually?
 
Hi Chris1,

Or do we have to update this parameter manually?

You have to set specific timezones on your very own.

Example for Germany:
Code:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone= "Europe/Berlin"

; http://php.net/date.default-latitude
date.default_latitude = 51.248532

; http://php.net/date.default-longitude
date.default_longitude = 6.704677
Please see as well: http://php.net/manual/en/timezones.php

Consider as well, to use other "error_reporting" - settings, to avoid such messages: http://php.net/manual/en/function.error-reporting.php
 
Hi @UFHH01

Thank you, I will set these manually. I was worried that Plesk would override my adjustment to the php.ini files.

Perhaps Odin could integrate the timezone information from the system time?

Oh error reporting is ok, I believe they got the error from the output of a cron task.
 
I had to go in and set it under the PHP settings for the already setup hosting account to get this to work.
 
Hello,

I am coming to you because it is impossible to have the dates in French on our site, the default comes from Plesk because we had it before under cPanel and the dates were in French.

We have updated the php.ini file, the server and when we go to the phpinfo file we have the timezone in Europe / Paris.

We don't know what to do anymore, I hope someone has a lead or a solution.

thank you in advance
 
Back
Top