文档(计费): 修正北京本地时间换算的返回值说明

beijing_local_micros 文档由「本地日期不存在返回原值」改为「返回 0」,与实际实现一致

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
2026-10-02 19:13:31 +08:00
parent f810064657
commit 5ab6f161d0
@@ -20,7 +20,7 @@ pub fn beijing_local_date_parts(micros: i64) -> (i32, u8, u8, i64) {
(year, month, day, time_of_day_micros)
}
/// 北京时间本地年月日 + 当日已过微秒 → UTC 微秒时间戳;本地日期不存在则返回原值。
/// 北京时间本地年月日 + 当日已过微秒 → UTC 微秒时间戳;本地日期不存在时返回 0。
pub fn beijing_local_micros(year: i32, month: u8, day: u8, time_of_day_micros: i64) -> i64 {
if !(1..=12).contains(&month) || day == 0 || day > days_in_month(year, month) {
return 0;