Configure time zone(HELP)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Php Beginner
Forum Commoner
Posts: 28
Joined: Fri Nov 04, 2011 9:04 am

Configure time zone(HELP)

Post by Php Beginner »

Hi there,

I am having some minor difficulties on configuring the time zone.

Here is the line:

Code: Select all

$thedate=date("U"); //get unix timestamp 
$displaytime=date("F j, Y, g:i a");
The line above not displaying the correct time zone where I currently in. I want to set the time zone to UTC+8.00.

How to set it? Please advise.
temidayo
Forum Contributor
Posts: 109
Joined: Fri May 23, 2008 6:17 am
Location: Nigeria

Re: Configure time zone(HELP)

Post by temidayo »

What you need is date_default_timezone_set.
http://www.php.net/manual/en/function.d ... ne-set.php
Post Reply