Skip to content

Commit 2f4f5b8

Browse files
authored
Fix FreeBSD date formatting (#1123)
1 parent 53b314b commit 2f4f5b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FoundationEssentials/Date.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ extension Date : CustomDebugStringConvertible, CustomStringConvertible, CustomRe
259259
// NSDate uses the constant format `uuuu-MM-dd HH:mm:ss '+0000'`
260260

261261
// Glibc needs a non-standard format option to pad %Y to 4 digits
262-
#if canImport(Glibc)
262+
#if canImport(Glibc) && !os(FreeBSD)
263263
let format = "%4Y-%m-%d %H:%M:%S +0000"
264264
#else
265265
let format = "%Y-%m-%d %H:%M:%S +0000"

0 commit comments

Comments
 (0)