ttlock / iOS_SDK_Demo

TTLock is a global provider of solutions for smart locks. We provide PCBA and softwares for lock manufactures and end users. We provide open API/SDK for developers. With these APIs/SDKs, you can develop your own applications to manage smart locks. The SDK here is for mobile app to communicate with locks via bluetooth.
MIT License
12 stars 12 forks source link

"Daylight saving setting": What does this feature do? How to implement it? #25

Closed pathanparvezkhan closed 6 months ago

pathanparvezkhan commented 8 months ago

Screenshot 2024-01-16 at 2 26 41 PM

pathanparvezkhan commented 8 months ago

Please provide the details for implementation (SDK method or API) for "Daylight saving setting" feature.

ttlock commented 7 months ago

It's quite troublesome to implement this using the existing interface. We will discuss it tomorrow and get back to you as soon as possible

ttlock commented 7 months ago

After setting the lock time by SDK, then call the API to update the time zone, then update the lockdata you are using.

SDK:+ (void)setLockTimeWithTimestamp:(long long)timestamp lockData:(NSString *)lockData success:(TTSucceedBlock)success failure:(TTFailedBlock)failure; note: timestamp = currentTimeStamp + (currentTimezoneRawOffSet - key.timezoneRawOffset); currentTimeStamp : The timestamp of the current time (in millisecond) currentTimezoneRawOffSet:The offset between your time zone and UTC, in millisecond .For example UTC+8 is 28800000. key.timezoneRawOffset:the lock detail returned by the server interface(https://cnopen.sciener.com/document/doc?urlName=cloud%2Flock%2Fdetail.html)

API :https://euopen.sciener.com/document/doc?urlName=cloud%2Flock%2FchangeTimezoneRawOffsetEn.html