Set world time
Function table
__IDO_FUNCTABLE__.funcTable38Model.setV3WorldTime
World Time Reference Table
Time Model Description
- IDOSetV3WorldTimeItemModel
Parameter | Description | Remark |
---|---|---|
cityId | ID number of each city | int |
minuteOffset | Current time and offset minute data for time zone 0 | int |
cityNameLen | City name | int |
cityName | City name | str |
sunriseHour | Sunrise hour | int |
sunriseMin | Sunrise minute | int |
sunsetHour | Sunset hour | int |
sunsetMin | Sunset minute | int |
longitudeFlag | Longitude flag | 1: East longitude; 2:West longitude |
longitude | Longitude | Retain 2 decimal places to expand the transmission by 100 times, the app needs to convert the corresponding points into degrees lon=104°4’ => (104 + 4/60)*100 rounded up |
latitudeFlag | Latitude flag | 1: north latitude; 2: south latitude |
latitude | Latitude | Retain 2 decimal places to expand the transmission by 100 times, the app needs to convert the corresponding points into degrees lon=104°4’ => (104 + 4/60)*100 rounded up |
- IDOSetV3WorldTimeModel
Parameter | Description | Remark |
---|---|---|
worldVersion | Version | No assignment needed for now |
itemsNum | The number of items | int |
items | World time collection | array (IDOSetV3WorldTimeItemModel) |
Command code
Objc:
IDOSetV3WorldTimeModel * model = [IDOSetV3WorldTimeModel currentModel];
[IDOFoundationCommand setWorldTimeCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetV3WorldTimeModel.current();
IDOFoundationCommand.setWorldTime(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};