mirror of
https://github.com/discourse/discourse.git
synced 2026-08-06 02:19:55 +08:00
1. Changes default email format to llll (eg: Tue, May 8, 2018 2:00 AM) from 2018-05-08T00:00:00Z UTC which is not nice on the eyes 2. Adds `discourse_local_dates_email_timezone` which allows configuring default timezone in emails 3. Improved help text on site settings (format / timezone) --------- Co-authored-by: Gary Pendergast <gary@pento.net>
19 lines
505 B
Ruby
Vendored
19 lines
505 B
Ruby
Vendored
# frozen_string_literal: true
|
|
class AddUtcToSetting < ActiveRecord::Migration[7.2]
|
|
def up
|
|
# we changed the setting so UTC is no longer appended, we append it now in the format
|
|
execute <<~SQL
|
|
UPDATE site_settings
|
|
SET value = value || ' z'
|
|
WHERE name = 'discourse_local_dates_email_format'
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
execute <<~SQL
|
|
UPDATE site_settings
|
|
SET value = REPLACE(value, ' z', '')
|
|
WHERE name = 'discourse_local_dates_email_format'
|
|
SQL
|
|
end
|
|
end
|