Why in now that date is 2011/10/31 codeigniter display to me date 2011/10/30, by following code.
<?php
echo date("Y/m/d");// Output in codeigniter is: 2011/10/30
?>
How can I make it output my date and not the server’s date?
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.
In all of my applications, I set the default timezone using this function: (usually, as you suggested, in a ‘config’ or ‘init’ file)
List of Supported Timezones
The basic idea is to run that once every time your application loads, and before any times are calculated/parsed; You know your applications best, and so will need to decide the best way to achieve this.
For example just set it in the
php.inior for codeigniter inconfig/config.php.