Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161462530
D36515.id110420.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D36515.id110420.diff
View Options
diff --git a/contrib/tzcode/stdtime/ctime.3 b/contrib/tzcode/stdtime/ctime.3
--- a/contrib/tzcode/stdtime/ctime.3
+++ b/contrib/tzcode/stdtime/ctime.3
@@ -30,7 +30,7 @@
.\" From: @(#)ctime.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd March 4, 2022
+.Dd September 10, 2022
.Dt CTIME 3
.Os
.Sh NAME
@@ -80,9 +80,7 @@
and
.Fn localtime
all take as an argument a time value representing the time in seconds since
-the Epoch (00:00:00
-.Tn UTC ,
-January 1, 1970; see
+the Epoch (00:00:00 UTC , January 1, 1970; see
.Xr time 3 ) .
.Pp
The function
@@ -112,9 +110,7 @@
.Fa tm_isdst Ns 'th
element of
.Fa tzname
-to a pointer to an
-.Tn ASCII
-string that is the time zone abbreviation to be
+to a pointer to an ASCII string that is the time zone abbreviation to be
used with
.Fn localtime Ns 's
return value.
@@ -183,8 +179,7 @@
pointed to by tm into a time value with the same encoding as that of the
values returned by the
.Xr time 3
-function (that is, seconds from the Epoch,
-.Tn UTC ) .
+function (that is, seconds from the Epoch, UTC) .
The
.Fn mktime
function
@@ -195,7 +190,7 @@
.Fn timegm
function
interprets the input structure as representing Universal Coordinated Time
-.Pq Tn UTC .
+.Pq UTC .
.Pp
The original values of the
.Fa tm_wday
@@ -286,10 +281,8 @@
.Pp
The field
.Fa tm_gmtoff
-is the offset (in seconds) of the time represented from
-.Tn UTC ,
-with positive
-values indicating east of the Prime Meridian.
+is the offset (in seconds) of the time represented from UTC,
+with positive values indicating east of the Prime Meridian.
.Sh SEE ALSO
.Xr date 1 ,
.Xr clock_gettime 2 ,
@@ -363,6 +356,12 @@
.Fn localtime_r
have been available since
.Fx 8.0 .
+.Sh CAVEATS
+The
+.Fn localtime
+function returns a NULL pointer, if the passed in time translates to a year
+that will not fit in an integer type.
+It is stricly recommended to check the return value to avoid garage output.
.Sh BUGS
Except for
.Fn difftime ,
@@ -376,13 +375,10 @@
function will modify the same object.
.Pp
The C Standard provides no mechanism for a program to modify its current
-local timezone setting, and the
-.Tn POSIX Ns No \&-standard
+local timezone setting, and the POSIX-standard
method is not reentrant.
(However, thread-safe implementations are provided
-in the
-.Tn POSIX
-threaded environment.)
+in the POSIX threaded environment.)
.Pp
The
.Va tm_zone
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 5, 1:13 AM (22 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34685546
Default Alt Text
D36515.id110420.diff (2 KB)
Attached To
Mode
D36515: ctime.3: Add a note about a possible return value to the description of localtime(3)
Attached
Detach File
Event Timeline
Log In to Comment