link to submission preview page in completed emails
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module TimeUtils
|
||||
module_function
|
||||
|
||||
def timezone_abbr(timezone, time = Time.current)
|
||||
tz_info = TZInfo::Timezone.get(
|
||||
ActiveSupport::TimeZone::MAPPING[timezone] || timezone || 'UTC'
|
||||
)
|
||||
|
||||
tz_info.abbreviation(time)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user