Now
This commit is contained in:
parent
01c83aaec3
commit
2944033856
@ -144,16 +144,16 @@ namespace YD_AllHeartRates.Api.Mqtt
|
||||
var payload = JsonSerializer.Deserialize<BlePayload>(msg.Payload, _jsonOpt);
|
||||
if (payload == null || payload.devices == null || payload.devices.Count == 0) return;
|
||||
|
||||
DateTime scoreTime;
|
||||
DateTime scoreTime = DateTime.Now;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(payload.send_time)
|
||||
|| !DateTime.TryParseExact(payload.send_time, "yyyy-MM-dd HH:mm:ss",
|
||||
CultureInfo.InvariantCulture, DateTimeStyles.None, out scoreTime)
|
||||
|| scoreTime < (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue)
|
||||
{
|
||||
// 解析失败或时间非法 → 使用当前时间
|
||||
scoreTime = DateTime.Now;
|
||||
}
|
||||
//if (string.IsNullOrWhiteSpace(payload.send_time)
|
||||
// || !DateTime.TryParseExact(payload.send_time, "yyyy-MM-dd HH:mm:ss",
|
||||
// CultureInfo.InvariantCulture, DateTimeStyles.None, out scoreTime)
|
||||
// || scoreTime < (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue)
|
||||
//{
|
||||
// // 解析失败或时间非法 → 使用当前时间
|
||||
// scoreTime = DateTime.Now;
|
||||
//}
|
||||
|
||||
foreach (var ble in payload.devices)
|
||||
{
|
||||
|
||||
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+95efb5c30882d0cd0551bf5a85da975d4b357d45")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+01c83aaec30a3d191d03fdcda1231b552d1aeafa")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@ -1 +1 @@
|
||||
88554745f927066d3a489012588ebbd2e874641f57411be8e4473463e06a5a4d
|
||||
a4974bdbfcb2a9341d508f81d314f958c26447c7f2dc89e4b2bfbf91a6465a75
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user