I'm attempting to create table data in Azure with mobile services. Got it working. It looks to me that my ndp2 is producing and persisting valid ISO 8601 DateTime to azure However the json.net JsonConvert.DeserializeObjectAsync in my Metro application barfs on the DataTime Deserialize. Please see this Stackoverflow quesion would appreicate it if you have experience with javascript and .net json.net.
// Initializes the time client SNTP_Client TimeClient = new SNTP_Client(new IntegratedSocket("time-a.nist.gov", 123)); // ExtendedTimeZone.SetTimeZone(TimeZoneId.Arizona); // not supported TimeClient.Synchronize();
The azure update. What might I use for DateTime.Parse as it is apparently unsupported? Or trim milliseconds from DateTime?
public static void AzureUpdateThread() { while (true) { string strTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss"); DateTime dateTimeMinusMilliSeconds = DateTime.Parse(strTime); // Apparently no DateTime.Parse HistoricalTemperatureDataForAzure htdForAzure = new HistoricalTemperatureDataForAzure() { DataLoggerName = DataLoggerName, // Time = DateTime.Now, // Time = DateTime.UtcNow, Time = dateTimeMinusMilliSeconds, Temperature0 = temperature0, Temperature1 = 0 }; var json = MobileService.GetTable("HistoricalTemperatureData").Insert(htdForAzure); Thread.Sleep(5 * 60 * 1000); }