patrickomni / omnimobileserver

Stubbed repository; using issues lists
0 stars 0 forks source link

Timezone calculation - done only for specific device types #323

Closed davroth closed 8 years ago

davroth commented 9 years ago

Timezone offset calculations are only being done today for devices that have a GeoLoc set if they are either CalAmp or PT300 Basic. We always want to calculate a time zone offset if the device either has a GeoLoc set for it or provides GeoLoc in report payload. The 'where' clause should be removed

update [TEMPPROCESSING] set MessageDate =  dateadd(HOUR,-1* ( [dbo].[fn_GetUTCFromGeoLoc](GeoLoc)), [TEMPPROCESSING].MessageDate)
            where 
            TEMPPROCESSING.DeviceId in (Select DeviceId from DeviceInventory where DeviceTypeId in (4, 5))

Timezone offsets are currently calculated in sp_ExecProcessDeviceSpecifics. A TODO in the s'proc recommends moving that calculation into sp_ExecIncomingData and that is the correct place to do it.

peters95 commented 8 years ago

this is now changed on OmniPing. this may result in some weird data for today.