1
0
mirror of https://github.com/lua/lua synced 2026-06-08 15:34:49 +00:00

Small correction in test about 'isdst'

The field 'isdst' can be false, so we cannot test its absence with
'if not D.isdst'; we must compare with nil for a correct test.
This commit is contained in:
Roberto Ierusalimschy
2019-04-22 12:31:29 -03:00
parent ed2872cd3b
commit 20b161e285
+1 -1
View File
@@ -832,7 +832,7 @@ load(os.date([[!assert(D.year==%Y and D.month==%m and D.day==%d and
do
local D = os.date("*t")
local t = os.time(D)
if not D.isdst then
if D.isdst == nil then
print("no daylight saving information")
else
assert(type(D.isdst) == 'boolean')