Skip to content Skip to footer navigation
You are reading the Statamic 6 Alpha docs. 👀

How to change your timezone to UTC

Statamic 6 introduces improved timezone handling. Using UTC as your timezone is a best practice.

It's best practice to keep your app's timezone set to UTC.

If you've had to change it in the past (maybe to workaround timezone issues in Statamic), you may now change it back to UTC.

Warning!

Before continuing, you will want to make a backup of your content and/or database.

Additionally, you may consider not changing your timezone for existing sites. While it is a best practice, it's not a requirement.

A troll pointing a teaching stick

Migration command

You can use our migration command which will update date fields throughout your content:

php please migrate-dates-to-utc America/New_York

You should replace America/New_York with whatever timezone you want to convert dates from (e.g. your old app timezone).

If you're storing content in a database, or outside of version control, you will need to run this command after deploying to production/staging.

Once complete, you may change your app's timezone in config/app.php:

// config/app.php
-'timezone' => 'America/New_York',
+'timezone' => 'UTC',