Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to set timezone in codelgniter

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 403
    Comment on it

    Hello Friends,

    If you are looking to update timezone in codelgniter application you need to make changes in index.php. By default timezone represent server local time suppose server is placed in Singapore then your default timezone would be Singapore, if you want to update this with Kolkata. Please use the below instruction to update this.

    1) Open "codelgniter/application/config/config.php" and change the below code:

    $config['time_reference'] = 'local';
    // Replace this with below code
    $config['time_reference'] = 'Asia/Kolkata';

    2) Open index.php and place the below code there:

    datedefaulttimezoneset(Asia/Kolkata); 

    Now you can see your timezone has been changed from Singapore to Kolkata

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: