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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 680
    Comment on it

    Hellow Reader's ,

    Some time we need to set default time zone in our applications.In this blog i am going to explain how you can do this.

    This is a simple step for change the defualt timezone in cakephp.

    Go to your project directory

    Open   App =>Config=>core.php

    Add below code in core.php file.

    date_default_timezone_set('Asia/Calcutta');
    Configure::write('TimeZone', 'Asia/Calcutta');

    If you are using Cakephp 2.6 + version  then change in bootstrap.php.

    Go to your project directory

    Open   App =>Config=>bootstrap.php

    
    date_default_timezone_set('Asia/Calcutta');
    Configure::write('TimeZone', 'Asia/Calcutta');
    

     

     

    Please feel free to comment.

 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: