# Bluetooth Device 時間同步管理 ###### tags: `seknova` `BLE` ## 需考量的部份 - UTC /GMT - GMT(格林威治標準時間 Greenwich Mean Time): 觀測太陽角度 - UTC(Universal time coordinated): 原子鐘: 銫原子進行固定震盪次數的時間 - 前身: UT1 電波來回太陽的觀測角度 - Time Zone: 時區 (-11~+12) - DST (Daylight Saving Time) - 起始日調快 1 小時,結束日減回 1 小時 ## IOT 架構設計 * 會變動時區的 Display 裝置需要記錄 Time Zone & DST。 * 資料庫時間不特別加註時區,在查詢的Query處理掉這件事情。 ![](https://i.imgur.com/xR8J3Zm.png) * 時區更動時的偵測與處理。 * 處理針對 DB 跟當前時區差異校正查詢Query。 * 啟動流程圖。 ![](https://i.imgur.com/wdu27Sr.png) * 時區變動流程圖 ![](https://i.imgur.com/jnAso0G.png) ## GATT Service Server client 架構 ![](https://i.imgur.com/ws6v814.png) - Battery Service ![](https://i.imgur.com/K2YzwEO.png) - Current Time Service ![](https://i.imgur.com/l4Q7EPV.png) ## Reference - https://pansci.asia/archives/84978