Skip to content

Commit

Permalink
Removed 'UseSameTimeZone' dependency (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
davideilmito authored Apr 15, 2023
1 parent e62a735 commit 16359a3
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 591 deletions.
4 changes: 2 additions & 2 deletions Sources/SunKit/HMS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public struct HMS: Equatable{
public var minutes: Double
public var seconds: Double

public init(from date: Date, useSameTimeZone: Bool){
public init(from date: Date){

var calendar: Calendar = .init(identifier: .gregorian)
calendar.timeZone = useSameTimeZone ? .current : .init(abbreviation: "GMT")!
calendar.timeZone = .init(abbreviation: "GMT")!

self.hours = Double(calendar.component(.hour, from: date))
self.minutes = Double(calendar.component(.minute, from: date))
Expand Down
Loading

0 comments on commit 16359a3

Please sign in to comment.