Setting the Timezone for PHP in the php ini file

0 votes

I'm trying to change the default PHP timezone to Asia/Calcutta by accessing the /etc/php5/cli/php.ini file and changing

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

To

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

But when I use phpinfo() to view the current timezone, it displays as Europe/Berlin time. Although I restarted and stopped the Apache server, the settings didn't appear to have changed.

Is there a step in the process that I'm overlooking?

Aug 1 in PHP by Kithuzzz
• 4,480 points
9 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer

How to find the php.ini file from the command line?

Hello @kartik, You can get a full phpinfo() using : php ...READ MORE

answered May 19, 2020 in PHP by Niroj
• 82,740 points
28,098 views
0 votes
0 answers

How to locate the php.ini file (xampp)?

I am using xampp server for PHP ...READ MORE

Jun 9 in PHP by Kichu
• 19,040 points
102 views
0 votes
0 answers

What's the maximum value for an int in PHP?

Ignoring the special libraries that allow you ...READ MORE

Jul 25 in PHP by Kithuzzz
• 4,480 points
8 views
0 votes
1 answer

What is meant by passing the variable by value and reference in PHP?

Hello, When the variable is passed as value ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,740 points
1,494 views
0 votes
1 answer

How do I get the current date and time in PHP?

The time would go by your server ...READ MORE

answered Feb 16 in Others by Aditya
• 7,300 points
39 views
0 votes
0 answers

What php timezone I use for San Francisco, California, United Stated

What PHP time zone can I use ...READ MORE

May 27 in PHP by Kichu
• 19,040 points
41 views
0 votes
0 answers

Convert one date format into another in PHP

How can I convert one date format ...READ MORE

Jun 20 in PHP by Kithuzzz
• 4,480 points
10 views
0 votes
0 answers

How to calculate the difference between two dates using PHP?

I have two dates on the form: Start ...READ MORE

Jun 24 in PHP by narikkadan
• 11,280 points
9 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP