mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: missing IST KST and JST timezones in cooked posts (#26252)
In this PR we introduced 3 new timezones to UX - IST, KST and JST
cb2569303f
However, the same has to be done in PrettyText so cooked posts respect those timezones.
This commit is contained in:

committed by
GitHub

parent
8180770e7b
commit
7f3f07dd40
@ -30,6 +30,15 @@ RSpec.describe "Local Dates" do
|
||||
|
||||
expect(cooked).to include('data-timezone="Asia/Calcutta"')
|
||||
expect(cooked).to include("05/08/2018 4:30:00 PM")
|
||||
|
||||
post = Fabricate(:post, raw: <<~MD)
|
||||
[date=2018-05-08 time=22:00 format="L LTS" timezone="IST"]
|
||||
MD
|
||||
|
||||
cooked = post.cooked
|
||||
|
||||
expect(cooked).to include('data-timezone="IST"')
|
||||
expect(cooked).to include("05/08/2018 4:30:00 PM")
|
||||
end
|
||||
|
||||
it "requires the right attributes to convert to a local date" do
|
||||
|
Reference in New Issue
Block a user