sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Muddasir's Avatar

Problem in setting timezone


Question posted by: Muddasir (Member) on August 27th, 2008 07:54 AM
Hi everyone

I want to set timezone (US/Central). It is working fine on my local computer but when I upload the code on web server It is giving me error

Fatal error: Call to undefined function: timezone_open() in

Here is the code

Expand|Select|Wrap|Line Numbers
  1. $tz1 = timezone_open("US/Central"); 
  2. $ts = date_create("2008-08-19 12:19:21", $tz1);  
  3. echo $ts->format(DATE_RFC822), "<br/>";$ts->setTimezone($tz1); 


If anyone could help me

Regards
1 Answer Posted
Dormilich's Avatar
Dormilich August 27th, 2008 08:10 AM
Expert - 596 Posts
#2: Re: Problem in setting timezone

what php version does the server use? timezone_open() requires PHP 5.1.0 at least.
Reply
Not the answer you were looking for? Post your question . . .
197,037 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,037 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top PHP Contributors