• 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!
  • 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.

Issue Wrong Time zone in PHP

flex1

New Pleskian
Hey Guys,
I migrated my Plesk installation to another server. All services are working but today I recognized that the time zone in PHP seems to be wrong. In the plesk settings (system time settings) the time zone (Europe/Berlin) is correct und the time outputted via SSH is correct, too. But if I run
PHP:
echo date("d.m.Y H:i:s");
the time is wrong. It's 1 hour behind. PHPInfo shows the time zone "UTC". It is possible to change that time zone to that zone, which is set in Plesk?


Thank you very much!
 
Check php.ini file

for OS php > /etc/php.ini
for Plesk PHP > /opt/plesk/php/<php verison>/etc/php.ini
 
Hello,

I am using Plesk onxy version 17.5.3 Update #55 on windows server 2012 R2.
some of customers are using php and need to use set time on their website. but there is 1 hrs different in any time zone they're using. for example if the current time is 02:00 his website shows 03:00 as wrong.

I have checked a lot of documents and the discussion on talk.plesk.com and also support.plesk.com. but issue is still doesn't resolved.

I've set date.timezone directly on php.ini in tools&settings on admin area also I've set this function trough the our customer account in his php settings by adding line, I also have set this function in pleskdir > admin > conf > php.ini
and did other things that suggested but result is the same!

I'm be gracefull if you suggest me a solution to solve this issue.

Thanks.
 
Have you checked that the server time (date command) returns the local time or is your server syncing to a network time elsewhere?
 
Have you checked that the server time (date command) returns the local time or is your server syncing to a network time elsewhere?
Server is using Windows server 2012 R2 and not Linux. But the server time is correct but just php time has issue.
 
1. Login to Plesk
2. Tools and Settings > PHP Settings > Click on the PHP handler (version) you are using
3. Click on php.ini
4. Edit the timezone in that file and change it to your location, e.g. Europe/Amsterdam, save the file.
 
Back
Top