Search
 
SCRIPT & CODE EXAMPLE
 

PHP

symfony set timezone

If you can’t set it in php.ini, or you want to be sure the value is consistent independently of the target environment, the easiest way is to set it in your AppBundle:

class AppBundle extends Bundle
{
    public function boot()
    {
        parent::boot();
        date_default_timezone_set("Europe/Madrid");
    }
}
Alternatively, if you don’t have an AppBundle (or any other own bundle), you could add it to the AppKernel::registerBundles() method, right before the bundles are loaded.
Comment

PREVIOUS NEXT
Code Example
Php :: find over array object php find 
Php :: php remove control characters from string 
Php :: laravel collection pipe 
Php :: json_decode 
Php :: How to disable Gutenberg / block editor for certain post types 
Php :: laravel migration string length 
Php :: read line by line php 
Php :: add options page advanced custom fields 
Php :: Install Older Version of Laravel using Composer 
Php :: file upload permission in php 
Php :: foreach ph 
Php :: Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 
Php :: cakephp get sql query string 
Php :: carbon get day name 
Php :: Copy file from one directory to another Laravel 
Php :: add bootstrap class to checkout fields woocommerce 
Php :: phpmyadmin add foreign key 
Php :: array_filter first element php 
Php :: How to create and access angular HTTP params in PHP 
Php :: how to link image in laravel 
Php :: how hide empty category woocommerce wordpress 
Php :: currency format in laravel 
Php :: eloquent get record older than 2 days 
Php :: laravel test mail 
Php :: insert multiple rows laravel 
Php :: php current time 
Php :: php hello world program 
Php :: php passing variables axios 
Php :: php get first day of month 
Php :: config clear without artisan 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =