Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 25 Mar 2024 23:19:29 +0000 (UTC)
From: Thorsten Glaser <tg@...bsd.de>
To: musl@...ts.openwall.com
Subject: Re: Broken mktime calculations when crossing DST boundary

Alexander Weps dixit:

>30th day of the month December was December 31st.

If counting days by counting them from the beginning of the
month, which POSIX is famously not doing even for seconds
since the epoch.

tm_mday is defined as day of month, not days since the
beginning of the month. So 31ˢᵗ December always has tm_mday
of 31, independent of whether 30ᵗʰ December existed in that
particular month.

bye,
//mirabilos
-- 
“It is inappropriate to require that a time represented as
 seconds since the Epoch precisely represent the number of
 seconds between the referenced time and the Epoch.”
	-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.