-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Team Mobile Schorsch
committed
Jul 31, 2024
1 parent
aea1141
commit 211f58a
Showing
62 changed files
with
2,151 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// Date.swift | ||
// | ||
// Copyright © 2024 Gini GmbH. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
extension Date { | ||
/** | ||
Returns the current timestamp in milliseconds for the Berlin timezone. | ||
This method calculates the current date and time, adjusts it to the Berlin timezone, | ||
and then returns the timestamp in milliseconds since the Unix epoch (January 1, 1970). | ||
- Returns: An `Int64` representing the current timestamp in milliseconds for the Berlin timezone. | ||
*/ | ||
static func berlinTimestamp() -> Int64? { | ||
let date = Date() | ||
let dateFormatter = DateFormatter() | ||
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss" | ||
dateFormatter.timeZone = TimeZone(identifier: "Europe/Berlin") | ||
let dateString = dateFormatter.string(from: date) | ||
|
||
// Convert the formatted date string back to a Date object | ||
guard let berlinDate = dateFormatter.date(from: dateString) else { | ||
print("Failed to convert string to date") | ||
return nil | ||
} | ||
// Convert the time interval to milliseconds and then to Int64 | ||
return Int64(berlinDate.timeIntervalSince1970 * 1000) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
Sources/GiniCaptureSDK/Core/Screens/Camera/Camera/CameraViewController+Actions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.