07 March, 2010

Solving the PHP timezone on Snow Leopard

I had this problem for sometime, tried 100 times changing the /etc/php.ini.default and restarting the server.
But to say how stupid I am, it was only one more step for me to get this done.

Let me explain how I set the timezone on my snow leopard.

1. I got my /etc/php.ini.default opened in my text editor (I use textmate, and open it as the root user).

2. Find the date controllers, search for "[Date]".

3. Now I had to set my timezone which is "Asia/Colombo" (for PHP list of supported timezones click here)

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Asia/Colombo"


4. Save the file and rename it to php.ini ( mv /etc/php.ini.default /etc/php.ini)

7 comments:

lura said...

nice post

just said...

thank for share, it is very important . ̄︿ ̄

Nivanka said...

Cool!, feel like this is pretty helpful.

mauro said...

Dear Nivanka, greetings from Argentina. I´m afraid the open.whynotonline.com web site it´s off. (offline). It´s a petty because of the great jQery demos that (used) to be there.
There´s any chance that those materials can be uploaded or zipped on to other web page or posted as files at your blog? Maybe it´s just a server downtime... but i´ve been trying to acces the URL for a whole week now...
Thanks for your great plugins anyway!
Mauro from Mendoza.

Nivanka said...

Hi Mauro,

yes I am not working at whynotonline.com now. I noticed the sites are down as well. But I will try to get the plugins and the web pages to a new domain name, soon. if you need to know anything feel free to drop me an email.

Really love to read your comment!

Nivanka

fundoo said...

Thanks for the information, we will add this story to our blog, as we have a audience in this sector that loves reading like this” web development

chanaka said...

Nice. Saved a lot time.