From 3c4c670fda917ac37bc033c26419ef28a9a06fe9 Mon Sep 17 00:00:00 2001 From: yedajiang44 <602830483@qq.com> Date: Sun, 16 Mar 2025 12:42:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=B5=B7=E5=A7=8B=E5=B9=B4?= =?UTF-8?q?=E4=BB=BD=E5=8A=A8=E6=80=81=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/JT808.Protocol/JT808.Protocol.xml | 2 +- src/JT808.Protocol/JT808Constants.cs | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/JT808.Protocol/JT808.Protocol.xml b/src/JT808.Protocol/JT808.Protocol.xml index 718bbbc..fb3ae97 100644 --- a/src/JT808.Protocol/JT808.Protocol.xml +++ b/src/JT808.Protocol/JT808.Protocol.xml @@ -5433,7 +5433,7 @@ JT808常量 - + 日期限制于2000年 diff --git a/src/JT808.Protocol/JT808Constants.cs b/src/JT808.Protocol/JT808Constants.cs index e41e2cb..43fab6f 100644 --- a/src/JT808.Protocol/JT808Constants.cs +++ b/src/JT808.Protocol/JT808Constants.cs @@ -17,7 +17,14 @@ namespace JT808.Protocol /// /// 日期限制于2000年 /// - public const int DateLimitYear = 2000; + public static int DateLimitYear + { + get + { + var result = DateTime.Today.Year; + return result - result % 100; + } + } /// /// /// @@ -25,7 +32,7 @@ namespace JT808.Protocol /// /// /// - public static Encoding Encoding { get;} + public static Encoding Encoding { get; } /// /// JT808_0x0200_0x01 /// @@ -222,7 +229,7 @@ namespace JT808.Protocol /// /// 电子围栏半径(非法位移阈值),单位为米 /// - public const uint JT808_0x8103_0x0032 = 0x0032; + public const uint JT808_0x8103_0x0032 = 0x0032; /// /// 监控平台电话号码 ///