From 956e92f161f7b0fbe9cb0dbe24ec55c05c62b4cf Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Thu, 15 Apr 2021 11:03:06 +0300 Subject: [PATCH] Change default timezone to Etc/UTC --- lib/plausible/site/schema.ex | 2 +- .../controllers/api/external_sites_controller_test.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plausible/site/schema.ex b/lib/plausible/site/schema.ex index deaaef63e..b0f907160 100644 --- a/lib/plausible/site/schema.ex +++ b/lib/plausible/site/schema.ex @@ -7,7 +7,7 @@ defmodule Plausible.Site do @derive {Jason.Encoder, only: [:domain, :timezone]} schema "sites" do field :domain, :string - field :timezone, :string, default: "Etc/Greenwich" + field :timezone, :string, default: "Etc/UTC" field :public, :boolean many_to_many :members, User, join_through: Plausible.Site.Membership diff --git a/test/plausible_web/controllers/api/external_sites_controller_test.exs b/test/plausible_web/controllers/api/external_sites_controller_test.exs index fb02170b5..0a7bb50cb 100644 --- a/test/plausible_web/controllers/api/external_sites_controller_test.exs +++ b/test/plausible_web/controllers/api/external_sites_controller_test.exs @@ -23,7 +23,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do } end - test "timezone defaults to Etc/Greenwich", %{conn: conn} do + test "timezone defaults to Etc/UTC", %{conn: conn} do conn = post(conn, "/api/v1/sites", %{ "domain" => "some-site.domain" @@ -31,7 +31,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do assert json_response(conn, 200) == %{ "domain" => "some-site.domain", - "timezone" => "Etc/Greenwich" + "timezone" => "Etc/UTC" } end