Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 1e06e95

Browse files
committed
Update
1 parent 1b4d284 commit 1e06e95

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/WordPressKit/Models/Stats/StatsSubscribersSummaryData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extension StatsSubscribersSummaryData: StatsTimeIntervalData {
1919

2020
static var hourlyDateFormatter: DateFormatter {
2121
let df = DateFormatter()
22-
df.locale = Locale(identifier: "en_US_POS")
22+
df.locale = Locale(identifier: "en_US_POSIX")
2323
df.dateFormat = "yyyy-MM-dd HH:mm:ss"
2424
return df
2525
}

Sources/WordPressKit/Models/Stats/Time Interval/StatsSiteMetricsResponse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ extension StatsSiteMetricsResponse: StatsTimeIntervalData {
7575
let dateFormatter = makeDateFormatter(for: period)
7676

7777
self.data = data.compactMap { data in
78-
guard let periodDate = dateFormatter.date(from: data[periodIndex] as? String ?? "") else {
78+
guard let date = dateFormatter.date(from: data[periodIndex] as? String ?? "") else {
7979
return nil
8080
}
8181
func getValue(at index: Int?) -> Int? {
8282
guard let index else { return nil }
8383
return data[index] as? Int
8484
}
8585
return PeriodData(
86-
date: periodDate,
86+
date: date,
8787
views: getValue(at: indices.views),
8888
visitors: getValue(at: indices.visitors),
8989
likes: getValue(at: indices.likes),

0 commit comments

Comments
 (0)