Posted inCodeigniter / Laravel / php / Programming

set timezone in codeigniter – how to set timezone in codeigniter?

set timezone in codeigniter – PHP date_default_timezone_set() function is used to sets the default timezone used by all date or time functions.

How to set timezone in codeigniter?

To set default timezone in PHP Codeigniter, you can add the simple PHP method Like date_default_timezone_set() function in your application/config.php or index.php file.

You are required to use the date.timezone setting or the date_default_timezone_set() function.

date_default_timezone_set(‘asia/kolkata’) in codeigniter

Codeigniter | Set timezone

date_default_timezone_set('your timezone');

EXAMPLE


application/config/config.php


date_default_timezone_set for india in php laravel

config/app.php

 replace timezone
 'timezone' => 'Asia/Kolkata'

date_default_timezone_set for india in php


PHP List of Supported Time Zones : PHP DateTimeZone

I hope you get an idea about set timezone in codeigniter.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype