Beispiel #1
0
        public void DownloadData()
        {
            acqTimeUTC = DateTime.UtcNow;

            // get local acq time
            TimeZoneInfo turkeyTZ;

            try
            {
                turkeyTZ = TimeZoneInfo.FindSystemTimeZoneById("Turkey Standard Time");
            }
            catch
            {
                turkeyTZ = TimeZoneInfo.FindSystemTimeZoneById("Turkey");
            }

            // TimeZoneInfo
            utcOffset    = turkeyTZ.GetUtcOffset(acqTimeUTC);
            acqTimeLocal = acqTimeUTC.Add(utcOffset);

            sensorData   = SpeedSensorData.ParseSpeedData(TKM.DownloadTrafficData());
            trafficIndex = TKM.DownloadTrafficIndex();
        }
Beispiel #2
0
 public async Task <SpeedSensorData> Create(SpeedSensorData data)
 {
     return(await _repository.Create(data));
 }