govuk_app_config 9.17.13 → 9.17.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80b7af86469ce96f2f6b1418f270cda24089a639dbd243f5955493fa0b65e401
4
- data.tar.gz: c6c97ccf511bd531716bbb122c013e2892faee9f1af857f6c2c272624d7b090d
3
+ metadata.gz: 377fba4f067fe0e3691781cb68c3435fe4eb291e259ec713e4e6d5fa2ebc4949
4
+ data.tar.gz: 33d889c59d259dc2972061573442c93f3aab86e3dcc84d82a4cc9d82451c8c24
5
5
  SHA512:
6
- metadata.gz: 3f9ebfb589e7fe72a713a7bcb1077033f8b2fffe07ba76ca7f6465f064a7d653bd09bc680793c6f3a822eacbbdb654cdf23e2f058ce80e471190bb9a7568a624
7
- data.tar.gz: 785260aa586b84a664fb5c95ab881cc92e0840dc7861bb0302ff476d57b4e74cfe21c17e5b592723b156953d42ca7c1e57f0634be261bf0e2a383112429f0040
6
+ metadata.gz: 739b366a7748e82afbf46a7316c3c54cec51434e7ffc4f2314e645a2f67fe349509a0fa231154cfcd7cfa780d549683b795da4cd12d4c82a8831c98a4729e2b4
7
+ data.tar.gz: 7505b631665cf5a734b6cd0cb115074747eb6f56d5f58a8001c0d9efc3feb9bcca25ee3be2ee703109a3eb4d51b1ae6ce5846888ac1fc2f22a4d036df8025e3b
data/.gitignore CHANGED
@@ -3,7 +3,6 @@
3
3
  /Gemfile.lock
4
4
  /_yardoc/
5
5
  /coverage/
6
- /doc/
7
6
  /pkg/
8
7
  /spec/reports/
9
8
  /tmp/
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 9.17.15
2
+
3
+ * Update dependencies
4
+
5
+ # 9.17.14
6
+
7
+ * Added ADR docs
8
+
1
9
  # 9.17.13
2
10
 
3
11
  * Fix a syntax error in ky translations
@@ -0,0 +1,60 @@
1
+ # 1. Timezone usage across GOV.UK
2
+
3
+ Date: 2025-06-27
4
+
5
+ ## Status
6
+
7
+ Accepted
8
+
9
+ ## Context
10
+
11
+ Within the landscape of GOV.UK, we have 3 main categories of deployables: Publishing Apps, API Services, Frontend Apps.
12
+
13
+ Timestamps are being passed between these apps and services. We need a consistent decision in handling timezones so we do not end up displaying the wrong date during British Summer Time where are we one hour out of sync with UTC.
14
+
15
+ ## Decision
16
+
17
+ The decision is for all `Publishing Apps` and `Frontend Apps` to default to `London` timezone (which will switch to BST during summer, and UTC during winter); and for all `API Services` to default to UTC. Reasons and some exceptions to the rule are listed below.
18
+
19
+ This means all apps need to parse Date and Timestamp with timezone parsing. More on this in `Consequences` section.
20
+
21
+ ### Reasonings
22
+
23
+ - In most cases, we use London as the timezone.
24
+ We make an exception for APIs, where we mostly want to provide UTC dates. A major reason for not migrating APIs to London timezone is because migrating major services like `Publishing API` may have consequences that we have yet to fully analyse.
25
+ - We also make an exception for travel advice publisher which is a `Publishing App` which operates in UTC. `Travel Advice Publisher` has users in lots of different local timezones. If we can improve the app to display in appropriate timezones we may be able to migrate it to use default London as other publishing apps do.
26
+
27
+ ### Exceptions
28
+
29
+ All `Publishing Apps` and `Frontend Apps` are in `London` timezone except*:
30
+
31
+ | App | Timezone | Reason |
32
+ |---|---|-------------------------------------------------------------------------------------------------------|
33
+ | Travel Advice Publisher | UTC | Publishers are publishing for many different timezones in which London timestamps may cause confusion |
34
+
35
+ All `API Services` are in `UTC` timezone except*:
36
+
37
+ | API | Timezone | Reason |
38
+ |-----------------|----------|-----------------------|
39
+ | Email Alert API | London | Has not been migrated |
40
+
41
+
42
+ *A full audit has yet to be conducted to ensure all our applications and APIs adhere to the above.
43
+
44
+ ## Consequences
45
+
46
+ With the discrepancy that Publishing Apps and Frontends operate in `London` timezones, but APIs operate in `UTC`, we run the risk of displaying wrong information to Publishers and the Public if we are parsing timestamps without their timezones.
47
+
48
+ Take the following Example scenario:
49
+
50
+ - Publishing App schedules article to publish at midnight BST, e.g. `01-07-2025 00:00 BST` which is equivalent to the day before in UTC `30-06-2025 23:00 UTC`
51
+ - This is sent to Publishing API and subsequently Search API
52
+ - Publishing time set in Publishing API and Search API as `30-06-2025 23:00 UTC`
53
+ - Frontend needs to parse the Date to display as Publication date.
54
+ - If the Date is simply parsed as `Date.parse(publication_date)` we get `30-06-2025` which is the **wrong** date.
55
+ - We **must** parse in the zone before extracting the date. E.g. `Time.zone.parse(publication_date).to_date` to get the correct date `01-07-2025`
56
+
57
+ ## Actions yet to take
58
+
59
+ - Do a full audit of which Timezone each Service or App operate in to identify exceptions to the rule
60
+ - Implement a linter guard to ensure we are not trapped in situations such as the one detailed above under `Consequences`. e.g. Error or Warn on all plain `Date.parse` or `Chronic` date parsing without timezone configured.
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency "rake", "~> 13.0"
40
40
  spec.add_development_dependency "rspec", "~> 3.10"
41
41
  spec.add_development_dependency "rspec-its", "~> 2.0"
42
- spec.add_development_dependency "rubocop-govuk", "5.1.15"
42
+ spec.add_development_dependency "rubocop-govuk", "5.1.16"
43
43
  spec.add_development_dependency "simplecov"
44
44
  spec.add_development_dependency "webmock"
45
45
  end
@@ -1,3 +1,3 @@
1
1
  module GovukAppConfig
2
- VERSION = "9.17.13".freeze
2
+ VERSION = "9.17.15".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_app_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.17.13
4
+ version: 9.17.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
@@ -291,14 +291,14 @@ dependencies:
291
291
  requirements:
292
292
  - - '='
293
293
  - !ruby/object:Gem::Version
294
- version: 5.1.15
294
+ version: 5.1.16
295
295
  type: :development
296
296
  prerelease: false
297
297
  version_requirements: !ruby/object:Gem::Requirement
298
298
  requirements:
299
299
  - - '='
300
300
  - !ruby/object:Gem::Version
301
- version: 5.1.15
301
+ version: 5.1.16
302
302
  - !ruby/object:Gem::Dependency
303
303
  name: simplecov
304
304
  requirement: !ruby/object:Gem::Requirement
@@ -352,6 +352,7 @@ files:
352
352
  - Rakefile
353
353
  - bin/console
354
354
  - bin/setup
355
+ - doc/adr/0001-timezone-usage-across-gov-uk.md
355
356
  - docs/healthchecks.md
356
357
  - govuk_app_config.gemspec
357
358
  - lib/govuk_app_config.rb