mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 06:28:57 +08:00
FIX: Add support for Europe/Kyiv timezone (#20394)
This commit is contained in:
parent
76260a4d79
commit
3cadeaf90f
2
Gemfile
2
Gemfile
|
@ -279,3 +279,5 @@ gem "webrick", require: false
|
|||
|
||||
# Workaround until Ruby ships with cgi version 0.3.6 or higher.
|
||||
gem "cgi", ">= 0.3.6", require: false
|
||||
|
||||
gem "tzinfo-data"
|
||||
|
|
|
@ -486,6 +486,8 @@ GEM
|
|||
timeout (0.3.2)
|
||||
tzinfo (2.0.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
tzinfo-data (1.2022.7)
|
||||
tzinfo (>= 1.0.0)
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unf (0.1.4)
|
||||
|
@ -657,6 +659,7 @@ DEPENDENCIES
|
|||
syntax_tree-disable_ternary
|
||||
test-prof
|
||||
thor
|
||||
tzinfo-data
|
||||
uglifier
|
||||
unf
|
||||
unicorn
|
||||
|
|
|
@ -178,6 +178,13 @@ RSpec.describe UserOption do
|
|||
ActiveSupport::TimeZone.find_tzinfo("Europe/Paris"),
|
||||
)
|
||||
end
|
||||
|
||||
it "works for Europe/Kyiv" do
|
||||
user.user_option.update(timezone: "Europe/Kyiv")
|
||||
expect(UserOption.user_tzinfo(user.id)).to eq(
|
||||
ActiveSupport::TimeZone.find_tzinfo("Europe/Kyiv"),
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context "with user with invalid timezone given" do
|
||||
|
|
Loading…
Reference in New Issue
Block a user