Skip to content

Commit 2119547

Browse files
committed
More dst changes
1 parent 9aae9ca commit 2119547

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/SQLDataAccess/SQLDataAccess.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ public class SQLDataAccess: NSObject {
577577
var time:tm = tm(tm_sec: 0, tm_min: 0, tm_hour: 0, tm_mday: 0, tm_mon: 0, tm_year: 0, tm_wday: 0, tm_yday: 0, tm_isdst: 0, tm_gmtoff: 0, tm_zone:nil)
578578
strptime(dateStr, "%Y-%m-%d %H:%M:%S", &time)
579579
//time.tm_isdst = -1
580-
//let diff = TimeZone.current.secondsFromGMT()
581-
let t = mktime(&time)
580+
let diff = TimeZone.current.secondsFromGMT()
581+
let t = mktime(&time) + diff
582582
let ti = TimeInterval(t)
583583
let date = Date(timeIntervalSince1970:ti)
584584
result[String(validatingUTF8: name!)!] = date as AnyObject?

0 commit comments

Comments
 (0)