Open parvez-geokey opened 2 months ago
1 correct, no need other steps 2 TTLock.getLockTime is to connect the lock and read the time of the clock in the lock TTLock.setLockTimeWithTimestamp is nothing to consider TTLock.getLightTime and TTLock.setLightTime belong to the safe lock, used to control the lighting time 3 Daylight Saving Setting: The method given earlier is not easy to understand, use the following method first step: call API : https://euopen.sciener.com/document/doc?urlName=cloud%2Flock%2FchangeTimezoneRawOffsetEn.html , this api will return new "lockData" second step: use the new "lockData" to setLockTime
func setLockTime() { let currentDate = Date() let timestamp = Int64(currentDate.timeIntervalSince1970 * 1000)
appLoaderView.startAnimating()
TTLock.setLockTimeWithTimestamp(timestamp, lockData: new "lockData") {
appLoaderView.stopAnimating()
self.labelTime.text = self.convertTimeIntervalToDate(timeInterval: timestamp)
} failure: { error, message in
appLoaderView.stopAnimating()
self.ShowAlert(titleStr: "", message: message ?? "")
}
}
I need detailed guidance on implementing the "Calibrate time" and "Daylight saving setting" features using the TTLock SDK.
Current Implementation: For "Calibrate time," our current approach involves using the TTLock.getLockTime method to retrieve the lock's current time and the TTLock.setLockTimeWithTimestamp method to calibrate the lock time. However, we're uncertain if this is the correct approach, as we have not used any specific API and have noticed a time variation between our app and the TTLock official app.
Please find below code snippets for our current implementation:
Queries:
Reference: I have previously posted an issue regarding the "Daylight saving setting" feature but didn't get a clear idea about its implementation. Here is the link to that issue: Issue #25.
Your assistance with these questions and a detailed implementation guide would be greatly appreciated.
Thank you for your support!