Search code examples
phplaraveltimezonephp-carbon

Custom time zone in PHP/Laravel


I got issue following by cancelation of using DST (Daylight Saving Time) in my country. This change doesn't appear in php library so I cannot use default time zones because +3:30 is not support now. Also timezone like GMT-3:30 is not declared. Any solution ?

Unless Carbon by itself accept setTimezone("+03:30") but I am looking for a solution to change timezone in all activities of my application


Solution

  • Problem solved by updating timezone db library using below command:

    pecl upgrade timezonedb
    

    And then it need to add this line to php.ini file:

    extension=timezonedb.so