3

Laravel provided the following timezone out of the box.

/*
    |--------------------------------------------------------------------------
    | Application Timezone
    |--------------------------------------------------------------------------
    |
    | Here you may specify the default timezone for your application, which
    | will be used by the PHP date and date-time functions. We have gone
    | ahead and set this to a sensible default for you out of the box.
    |
    */

    'timezone' => 'UTC',

Am confused about the right Time Zone to use in my laravel application. My application involves users world wide.

So I don't know if i should use the default Time Zone provided by Laravel or use my country Time Zone which i think is UTC+01:00 and what are the implications of using a wrong Time Zone in web application.

Emeka Mbah
  • 16,745
  • 10
  • 77
  • 96
  • I don't see how this is specific to laravel. – PeeHaa Mar 10 '15 at 11:58
  • I understand Time Zone is not laravel specific but I want to know if Laravel takes care of the time zone for me – Emeka Mbah Mar 10 '15 at 12:02
  • 1
    If they say "We have gone ahead and set this to a sensible default for you", I'd consider leaving it as it is. You might find this StackOverflow question interesting: [*How can I handle time zones in my webapp?*](http://stackoverflow.com/q/10834665/1364007). – Wai Ha Lee Mar 10 '15 at 12:16
  • Opinion based question – Zarathuztra Mar 10 '15 at 12:39
  • Everything set to UTC and later on when your app grows tell carbon to convert xx date to whatever timezone you want (preferably whatever user sets in profile etcetera). – Kyslik Mar 10 '15 at 18:16

1 Answers1

0

You should set your app timezone regarding the users of the application. There no relations between Laravel and timezone.

Munna Khan
  • 1,902
  • 1
  • 18
  • 24