From a9f44c0aa62362eee24594471c35d3b7fdd233e1 Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 18 Jun 2024 16:39:37 -0700 Subject: [PATCH] Configure the application's default time zone to NST (US Pacific) This doesn't affect a lot right now, it was previously defaulting to UTC I think? And I've confirmed that, while timestamps are stored in the database as UTC, they're not interpreted any differently with this setting. (Or, rather, it's loaded as a `DateTime` object for the same moment in time, but in the NST time zone. Good!) But this feels like a more useful default for displaying things for development etc, and moreover, I'm working on some logic for things like "when do limited-time Dyeworks items expire exactly?", and that logic is made *much* simpler if we can just compare dates in NST by default rather than fudge around with the zones on them and figuring out the correct midnight! (Although, as I type this, I think I maybe have thought of an easier way to do it? So maybe this change won't actually be necessary for that, but it still feels like a more sensible default for us regardless!) --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index d2bf815a..74392543 100644 --- a/config/application.rb +++ b/config/application.rb @@ -44,7 +44,7 @@ module OpenneoImpressItems # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # - # config.time_zone = "Central Time (US & Canada)" + config.time_zone = "Pacific Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") config.i18n.fallbacks = true