mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-11 17:38:38 +00:00
set default timezone to UTC and fix try usage
This commit is contained in:
parent
e988951ff9
commit
f2954dc10d
@ -393,7 +393,7 @@ enum ItemType: Decodable {
|
|||||||
|
|
||||||
case .timeButton:
|
case .timeButton:
|
||||||
let template = try container.decodeIfPresent(String.self, forKey: .formatTemplate) ?? "HH:mm"
|
let template = try container.decodeIfPresent(String.self, forKey: .formatTemplate) ?? "HH:mm"
|
||||||
let timeZone = try container.decodeIfPresent(String.self, forKey: .timeZone) ?? nil
|
let timeZone = try? container.decodeIfPresent(String.self, forKey: .timeZone) ?? "UTC"
|
||||||
self = .timeButton(formatTemplate: template, timeZone: timeZone!)
|
self = .timeButton(formatTemplate: template, timeZone: timeZone!)
|
||||||
|
|
||||||
case .battery:
|
case .battery:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user