Skip to content

Commit 705c95f

Browse files
committed
docs(Utility): 在年份时间方法注释中明确引用当前时区
在TimerHelper.Year.cs文件的多个方法注释中,添加对CurrentTimeZone属性的明确引用,以澄清时区计算逻辑。
1 parent ce01c0d commit 705c95f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

GameFrameX.Foundation.Utility/Time/TimerHelper.Year.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public partial class TimerHelper
3838
/// </summary>
3939
/// <returns>本年1月1日零点时间</returns>
4040
/// <remarks>
41-
/// 此方法基于当前时区时间计算年份:
41+
/// 此方法基于当前时区 (<see cref="CurrentTimeZone"/>) 时间计算年份:
4242
/// 1. 获取当前时区时间的年份
4343
/// 2. 返回该年份1月1日零点时间
4444
///
@@ -61,7 +61,7 @@ public static DateTime GetYearStartTime()
6161
/// <returns>本年1月1日零点时间戳(秒)</returns>
6262
/// <remarks>
6363
/// 此方法返回当前年份1月1日零点的Unix时间戳
64-
/// 使用当前时区计算时间
64+
/// 使用当前时区 (<see cref="CurrentTimeZone"/>) 计算时间
6565
/// 例如:2024年返回2024-01-01 00:00:00的时间戳
6666
/// </remarks>
6767
public static long GetYearStartTimestamp()
@@ -76,7 +76,7 @@ public static long GetYearStartTimestamp()
7676
/// <returns>本年12月31日23:59:59的时间</returns>
7777
/// <remarks>
7878
/// 此方法返回当前年份最后一天的最后一秒
79-
/// 使用当前时区计算时间
79+
/// 使用当前时区 (<see cref="CurrentTimeZone"/>) 计算时间
8080
/// 例如:2024年返回2024-12-31 23:59:59
8181
/// </remarks>
8282
public static DateTime GetYearEndTime()
@@ -90,7 +90,7 @@ public static DateTime GetYearEndTime()
9090
/// <returns>本年12月31日23:59:59的时间戳(秒)</returns>
9191
/// <remarks>
9292
/// 此方法返回当前年份最后一天的最后一秒的Unix时间戳
93-
/// 使用当前时区计算时间
93+
/// 使用当前时区 (<see cref="CurrentTimeZone"/>) 计算时间
9494
/// 例如:2024年返回2024-12-31 23:59:59的时间戳
9595
/// </remarks>
9696
public static long GetYearEndTimestamp()
@@ -122,7 +122,7 @@ public static DateTime GetStartTimeOfYear(DateTime date)
122122
/// <remarks>
123123
/// 此方法返回指定日期所在年份的1月1日零点时间的Unix时间戳
124124
/// 例如:输入2024-01-10,返回2024-01-01 00:00:00的时间戳
125-
/// 会将时间转换为UTC时间后再计算时间戳
125+
/// 会使用当前时区 (<see cref="CurrentTimeZone"/>) 计算偏移量并将时间转换为UTC时间后再计算时间戳
126126
/// </remarks>
127127
public static long GetStartTimestampOfYear(DateTime date)
128128
{
@@ -153,7 +153,7 @@ public static DateTime GetEndTimeOfYear(DateTime date)
153153
/// <remarks>
154154
/// 此方法返回指定日期所在年份的12月31日最后一秒的Unix时间戳
155155
/// 例如:输入2024-01-10,返回2024-12-31 23:59:59的时间戳
156-
/// 会将时间转换为UTC时间后再计算时间戳
156+
/// 会使用当前时区 (<see cref="CurrentTimeZone"/>) 计算偏移量并将时间转换为UTC时间后再计算时间戳
157157
/// </remarks>
158158
public static long GetEndTimestampOfYear(DateTime date)
159159
{

0 commit comments

Comments
 (0)