Skip to content

Commit

Permalink
add doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesquires committed Jan 26, 2024
1 parent c85342a commit 52aced2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/main.swift
Expand Up @@ -12,8 +12,11 @@ import Foundation

#if os(OSX)

/// A date formatter in current time zone and locale.
/// This is required for simulators to display the same date/time in all time zones.
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss"
// Handle daylight savings time
dateFormatter.timeZone = TimeZone(secondsFromGMT: TimeZone.current.secondsFromGMT())
dateFormatter.locale = Locale.current

Expand Down

0 comments on commit 52aced2

Please sign in to comment.