摘要:
测试代码 local date1 = { year = 2024, month = 11, day = 3, hour = 1, min = 0, sec = 0 } local timestamp1 = os.time(date1) local date2 = { year = 2024, mon 阅读全文
posted @ 2025-08-30 15:31
yanghui01
阅读(33)
评论(0)
推荐(0)
摘要:
对于美国东部时区(UTC-5) ,如果只有日期时间信息,2024-03-10 02:00:00,我们没法直接判断是否为夏令时,为什么呢?看下面两个时间字符串: 1) 2024-03-10 02:00:00(EST, UTC-5) 是夏令时 2) 2024-03-10 02:00:00(EDT, UT 阅读全文
posted @ 2025-08-30 15:31
yanghui01
阅读(19)
评论(0)
推荐(0)
摘要:
isdst参数对os.time的影响 把电脑时区先改为UTC-5时区,这边用美国东部时区(UTC-5)来试验 local function PrintDate(tag, deltaTimestamp, dt) if dt.isdst then print(tag, deltaTimestamp, s 阅读全文
posted @ 2025-08-30 15:31
yanghui01
阅读(85)
评论(0)
推荐(0)
摘要:
lua中的数组索引从1开始 --x最小值为1 local function CircularAccess(x) local arr = ["a", "b", "c"] local idx = math.fmod(x, #arr) if 0 == idx then idx = #arr end pri 阅读全文
posted @ 2025-08-30 15:30
yanghui01
阅读(9)
评论(0)
推荐(0)

浙公网安备 33010602011771号