Add a common date formatter for log messages.

This commit is contained in:
Brent Simmons committed 2026-06-06 13:11:41 -07:00
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
}()
}