mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 00:31:14 +00:00
Add a common date formatter for log messages.
This commit is contained in:
1 parent
1e7bf4048d
commit
62ea1f32d3
1 file changed
+19
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// DateFormatter+RSCore.swift
|
||||
// RSCore
|
||||
//
|
||||
// Created by Brent Simmons on 6/6/26.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public extension DateFormatter {
|
||||
|
||||
/// Fixed-format log timestamp: `yyyy-MM-dd HH:mm:ss`, POSIX locale.
|
||||
static let logTimestamp: DateFormatter = {
|
||||
let formatter = DateFormatter()
|
||||
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
|
||||
formatter.locale = Locale(identifier: "en_US_POSIX")
|
||||
return formatter
|
||||
}()
|
||||
}
|
||||
Reference in new issue
Block a user