1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-10 17:08:39 +00:00

switch from localized to custom templates

This commit is contained in:
Toxblh 2019-01-22 12:46:17 +03:00
parent 807290ff0c
commit f4b8e1f39a

View File

@ -5,7 +5,7 @@ class TimeTouchBarItem: CustomButtonTouchBarItem {
private var timer: Timer! private var timer: Timer!
init(identifier: NSTouchBarItem.Identifier, formatTemplate: String, timeZone: String? = nil) { init(identifier: NSTouchBarItem.Identifier, formatTemplate: String, timeZone: String? = nil) {
dateFormatter.setLocalizedDateFormatFromTemplate(formatTemplate) dateFormatter.dateFormat = formatTemplate
if let abbr = timeZone { if let abbr = timeZone {
dateFormatter.timeZone = TimeZone(abbreviation: abbr) dateFormatter.timeZone = TimeZone(abbreviation: abbr)
} }