my project is hosted on shared server and i want to change
the timezone to Asia/Kolkata.
i have tried setting timezone using htaccess file but failed.
my project is hosted on shared server and i want to change the timezone
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
With CodeIgniter, the best place to set the timezone is inside the main
index.phpfile. It’s at the same level in your project structure as thesystem/andapplication/folders.Just add the following as the first line of code in the file after the opening
<?phptag:That should do it for all your PHP code.
Don’t forget that if you’re using a database, the timezone for the database will probably be different as well. If you’re using MySQL, you’ll want to do a
SET time_zone = "+05:30"query as soon as you open a database connection.