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; /// /// 监控平台电话号码 ///