Page 1 of 1

Timezone Issue

Posted: Thu Apr 21, 2011 6:14 am
by Tushar07
Hi,

I have set the Timezone in the PHP.ini file as follows:-

; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Asia/Calcutta"

; http://php.net/date.default-latitude
;date.default_latitude = 31.7667


But when i PHP -info from the command prompt i get the following -

date

date/time support => enabled
"Olson" Timezone Database Version => 2010.15
Timezone Database => internal
Default timezone => Asia/Kolkata

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value

Can you please tell me even after setting the timezone to Asia/Calcutta why it shows it as No Value. I am using IIS7

Thanks,
Tushar

Re: Timezone Issue

Posted: Thu Apr 21, 2011 12:55 pm
by incubi
Hi,
Using PHP on the command line may use a different php.ini then running phpinfo.php in a browser.

change dir to where the php.ini is that you know you set and try this.

php -c ./ -info

This will use the ini file in the directory you are in and not the one that could be in your path.


Lee

Re: Timezone Issue

Posted: Thu Apr 21, 2011 12:57 pm
by fugix
also..make sure to restart your server after changing your php.ini file....otherwise the changes wont be set