예제 #1
0
파일: TKMDemo.cs 프로젝트: snmz216/libTKM
        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();
        }
예제 #2
0
 public async Task <SpeedSensorData> Create(SpeedSensorData data)
 {
     return(await _repository.Create(data));
 }