Skip to content

Commit 9088c95

Browse files
committed
docs(Time): 统一文档中关于时区的描述术语
将文档中的“本地时间”统一修正为“当前时区时间”,以更准确地反映方法实际行为。所有相关方法现在都明确说明使用 CurrentTimeZone 时区,避免术语混淆。
1 parent 676ad0e commit 9088c95

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ public static string CurrentTimeWithUtcFullString()
5050
}
5151

5252
/// <summary>
53-
/// 获取当前本地时间,格式为HHmmss的字符串
53+
/// 获取当前时区 (<see cref="CurrentTimeZone"/>) 时间,格式为HHmmss的字符串
5454
/// </summary>
55-
/// <returns>返回一个6位字符串,表示当前本地时间。例如:143045表示14:30:45</returns>
55+
/// <returns>返回一个6位字符串,表示当前时区 (<see cref="CurrentTimeZone"/>) 时间。例如:143045表示14:30:45</returns>
5656
/// <remarks>
57-
/// 此方法将当前本地时间转换为6位时间字符串:
57+
/// 此方法将当前时区 (<see cref="CurrentTimeZone"/>) 时间转换为6位时间字符串:
5858
/// - 前2位表示小时(24小时制)
5959
/// - 中间2位表示分钟
6060
/// - 最后2位表示秒
61-
/// 使用DateTime.Now获取本地时间
61+
/// 使用 <see cref="GetNow"/> 获取当前时区 (<see cref="CurrentTimeZone"/>) 的时间
6262
/// </remarks>
6363
public static string CurrentTimeWithLocalFullString()
6464
{
@@ -82,11 +82,11 @@ public static int CurrentTimeWithUtcTime()
8282
}
8383

8484
/// <summary>
85-
/// 获取当前本地时间,格式为HHmmss的整数
85+
/// 获取当前时区 (<see cref="CurrentTimeZone"/>) 时间,格式为HHmmss的整数
8686
/// </summary>
87-
/// <returns>返回一个6位整数,表示当前本地时间。例如:143045表示14:30:45</returns>
87+
/// <returns>返回一个6位整数,表示当前时区 (<see cref="CurrentTimeZone"/>) 时间。例如:143045表示14:30:45</returns>
8888
/// <remarks>
89-
/// 此方法将当前本地时间转换为6位整数:
89+
/// 此方法将当前时区 (<see cref="CurrentTimeZone"/>) 时间转换为6位整数:
9090
/// - 前2位表示小时(24小时制)
9191
/// - 中间2位表示分钟
9292
/// - 最后2位表示秒
@@ -98,15 +98,15 @@ public static int CurrentTimeWithLocalTime()
9898
}
9999

100100
/// <summary>
101-
/// 获取当前本地时区时间的自定义格式字符串
101+
/// 获取当前时区 (<see cref="CurrentTimeZone"/>) 时间的自定义格式字符串
102102
/// </summary>
103103
/// <param name="format">时间格式字符串,默认为"yyyy-MM-dd HH:mm:ss.fff K"</param>
104-
/// <returns>返回指定格式的本地时间字符串。例如默认格式返回:"2023-12-25 14:30:45.123 +08:00"</returns>
104+
/// <returns>返回指定格式的当前时区 (<see cref="CurrentTimeZone"/>) 时间字符串。例如默认格式返回:"2023-12-25 14:30:45.123 +08:00"</returns>
105105
/// <remarks>
106106
/// 此方法允许自定义时间格式字符串:
107107
/// - 默认格式包含年月日时分秒毫秒和时区信息
108108
/// - 可以通过format参数指定其他格式
109-
/// - 使用DateTime.Now获取本地时间
109+
/// - 使用 <see cref="GetNow"/> 获取当前时区 (<see cref="CurrentTimeZone"/>) 的时间
110110
/// 支持标准的.NET日期时间格式说明符
111111
/// </remarks>
112112
public static string CurrentDateTimeWithFormat(string format = "yyyy-MM-dd HH:mm:ss.fff K")
@@ -150,9 +150,9 @@ public static DateTime GetUtcNow()
150150
/// </summary>
151151
/// <returns>当前时间</returns>
152152
/// <remarks>
153-
/// 此方法返回当前的本地时间
153+
/// 此方法返回当前的当前时区 (<see cref="CurrentTimeZone"/>) 时间
154154
/// 会根据设置的时区(<see cref="CurrentTimeZone"/>)自动调整
155-
/// 主要用于需要显示本地时间的场景
155+
/// 主要用于需要显示当前时区 (<see cref="CurrentTimeZone"/>) 时间的场景
156156
/// </remarks>
157157
public static DateTime GetNow()
158158
{

0 commit comments

Comments
 (0)