Solved

How can I force PHP to use the Local Time of Ubuntu server, and Not UTC?

Posted on 2011-09-05
2
374 Views
Last Modified: 2012-05-12
How can I force PHP to use the Local Time of Ubuntu server, and Not UTC?
0
Comment
Question by:smetterd
2 Comments
 
LVL 17

Accepted Solution

by:
OmniUnlimited earned 250 total points
ID: 36484632
0
 
LVL 109

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 36485395
Please see this article about handling DATETIME:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html

In particular, you might find Practical Application Number 8 to be responsive to your question.

And you can use this built-in PHP function
http://php.net/manual/en/function.date-default-timezone-set.php

HTH, ~Ray
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
The viewer will learn how to dynamically set the form action using jQuery.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question