Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108606521
D44503.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
911 B
Referenced Files
None
Subscribers
None
D44503.diff
View Options
diff --git a/lib/libc/stdtime/ctime.3 b/lib/libc/stdtime/ctime.3
--- a/lib/libc/stdtime/ctime.3
+++ b/lib/libc/stdtime/ctime.3
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 20, 2023
+.Dd March 26, 2024
.Dt CTIME 3
.Os
.Sh NAME
@@ -241,7 +241,21 @@
.Fn mktime
function
returns the specified calendar time; if the calendar time cannot be
-represented, it returns \-1;
+represented, it returns \-1 and sets
+.Xr errno 3
+to an appropriate value.
+.Pp
+Note that \-1 is a valid result (representing one second before
+midnight UTC on the evening of 31 December 1969), so this cannot be
+relied upon to indicate success or failure; instead,
+.Fa tm_wday
+and / or
+.Fa tm_yday
+should be set to an out-of-bounds value (e.g. \-1) prior to calling
+.Fn mktime
+or
+.Fn timegm
+and checked after the call.
.Pp
The
.Fn difftime
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 8:18 PM (7 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16196023
Default Alt Text
D44503.diff (911 B)
Attached To
Mode
D44503: libc: Improve description of mktime() / timegm().
Attached
Detach File
Event Timeline
Log In to Comment