# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2026-06-05 06:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ctime" msgstr "" #. type: TH #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "2026-02-08" msgstr "" #. type: TH #: archlinux debian-unstable #, no-wrap msgid "Linux man-pages 6.18" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "asctime, ctime, gmtime, localtime, mktime, asctime_r, ctime_r, gmtime_r, " "localtime_r - transform date and time to broken-down time or ASCII" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "LIBRARY" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "Standard C library (I,\\ I<-lc>)" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B<#include Etime.hE>\n" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "BIB<);>\n" "BIB<,>\n" "B< char >IB<[restrict 26]);>\n" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "BIB<);>\n" "BIB<,>\n" "B< char >IB<[restrict 26]);>\n" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "BIB<);>\n" "BIB<,>\n" "B< struct tm *restrict >IB<);>\n" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "BIB<);>\n" "BIB<,>\n" "B< struct tm *restrict >IB<);>\n" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "BIB<);>\n" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Feature Test Macro Requirements for glibc (see B(7)):" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "B(), B(), B(), B():" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" " _POSIX_C_SOURCE\n" " || /* glibc E= 2.19: */ _BSD_SOURCE || _SVID_SOURCE\n" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B(), B(), and B() functions all take an " "argument of data type I, which represents calendar time. When " "interpreted as an absolute time value, it represents the number of seconds " "elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() and B() functions both take an argument " "representing broken-down time, which is a representation separated into " "year, month, day, and so on." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "Broken-down time is stored in the structure I, described in B(3type)." msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed msgid "" "The call BIB<)> is equivalent to I. It " "converts the calendar time I into a null-terminated string of the form" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "\"Wed Jun 30 21:49:08 1993\\[rs]n\"\n" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The abbreviations for the days of the week are \"Sun\", \"Mon\", \"Tue\", " "\"Wed\", \"Thu\", \"Fri\", and \"Sat\". The abbreviations for the months " "are \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", " "\"Sep\", \"Oct\", \"Nov\", and \"Dec\". The return value points to a " "statically allocated string which might be overwritten by subsequent calls " "to any of the date and time functions. The function also sets the external " "variables I, I, and I as if it called " "B(3). The reentrant version B() does the same, but stores " "the string in a user-supplied buffer which should have room for at least 26 " "bytes. It need not set I, I, and I." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function converts the calendar time I to broken-down " "time representation, expressed in Coordinated Universal Time (UTC). It may " "return NULL when the year does not fit into an integer. The return value " "points to a statically allocated struct which might be overwritten by " "subsequent calls to any of the date and time functions. The B() " "function does the same, but stores the data in a user-supplied struct." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function converts the calendar time I to broken-" "down time representation, expressed relative to the user's specified " "timezone. The function also sets the external variables I, " "I, and I as if it called B(3). The return value " "points to a statically allocated struct which might be overwritten by " "subsequent calls to any of the date and time functions. The " "B() function does the same, but stores the data in a user-" "supplied struct. It need not set I, I, and I." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function converts the broken-down time value I into a " "null-terminated string with the same format as B(). The return value " "points to a statically allocated string which might be overwritten by " "subsequent calls to any of the date and time functions. The B() " "function does the same, but stores the string in a user-supplied buffer " "which should have room for at least 26 bytes." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function converts a broken-down time structure, expressed " "as local time, to calendar time representation. The function ignores the " "values supplied by the caller in the I and I fields. The " "value specified in the I field informs B() whether or not " "daylight saving time (DST) is in effect for the time supplied in the I " "structure: a positive value means DST is in effect; zero means that DST is " "not in effect; and a negative value means that B() should (use " "timezone information and system databases to) attempt to determine whether " "DST is in effect at the specified time. See B(3) for a UTC " "equivalent of this function." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The B() function modifies the fields of the I structure as " "follows: I and I are set to values determined from the " "contents of the other fields; if structure members are outside their valid " "interval, they will be normalized (so that, for example, 40 October is " "changed into 9 November); I is set (regardless of its initial " "value) to a positive value or to 0, respectively, to indicate whether DST " "is or is not in effect at the specified time. The function also sets the " "external variables I, I, and I as if it called " "B(3)." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "If the specified broken-down time cannot be represented as calendar time " "(seconds since the Epoch), B() returns I<(time_t)\\ -1> and does " "not alter the members of the broken-down time structure." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "RETURN VALUE" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On success, B() and B() return a pointer to a " "I." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On success, B() and B() return the address of the " "structure pointed to by I." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "On success, B() and B() return a pointer to a string." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On success, B() and B() return a pointer to the string " "pointed to by I." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On success, B() returns the calendar time (seconds since the " "Epoch), expressed as a value of type I." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "On error, B() returns the value I<(time_t)\\ -1>, and leaves the " "Itm_wday> member unmodified. The remaining functions return NULL " "on error. On error, I is set to indicate the error." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ERRORS" msgstr "" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "The result cannot be represented." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "ATTRIBUTES" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "For an explanation of the terms used in this section, see B(7)." msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Interface" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Attribute" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Value" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".na\n" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid ".nh\n" msgstr "" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. #-#-#-#-# archlinux: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: SS #. #-#-#-#-# debian-trixie: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: tbl table #. #-#-#-#-# debian-unstable: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: SS #. #-#-#-#-# fedora-44: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: SS #. #-#-#-#-# fedora-rawhide: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: SS #. #-#-#-#-# mageia-cauldron: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: SS #. #-#-#-#-# opensuse-leap-16-1: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: SS #. #-#-#-#-# opensuse-tumbleweed: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: SS #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Thread safety" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Unsafe race:asctime locale" msgstr "" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe locale" msgstr "" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "MT-Unsafe race:tmbuf\n" "race:asctime env locale" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "B(),\n" "B(),\n" "B(),\n" "B()" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Safe env locale" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "B(),\n" "B()" msgstr "" #. type: tbl table #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "MT-Unsafe race:tmbuf env locale" msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "VERSIONS" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "POSIX doesn't specify the parameters of B() to be I; " "that is specific to glibc." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "In many implementations, including glibc, a 0 in I is interpreted " "as meaning the last day of the preceding month." msgstr "" #. See http://thread.gmane.org/gmane.comp.time.tz/2034/ #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "According to POSIX.1, B() is required to behave as though " "B(3) was called, while B() does not have this " "requirement. For portable code, B(3) should be called before " "B()." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "STANDARDS" msgstr "" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "C23, POSIX.1-2024." msgstr "" #. type: TP #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1-2024." msgstr "" #. type: TQ #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "B()" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "None." msgstr "" #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "HISTORY" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "C89, POSIX.1-1988." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "C89, POSIX.1-1988. Marked obsolescent in C23 and in POSIX.1-2008 " "(recommending B(3))." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "POSIX.1-1996." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "POSIX.1-1996. Marked obsolescent in POSIX.1-2008. Removed in POSIX.1-2024 " "(recommending B(3))." msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "CAVEATS" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The four functions B(), B(), B(), and " "B() return a pointer to static data and hence are not thread-" "safe. The thread-safe versions, B(), B(), " "B(), and B(), are specified by SUSv2." msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "POSIX.1 says: \"The B(), B(), B(), and " "B() functions shall return values in one of two static objects: " "a broken-down time structure and an array of type I. Execution of any " "of the functions that return a pointer to one of these object types may " "overwrite the information in any object of the same type pointed to by the " "value returned from any previous call to any of them.\" This can occur in " "the glibc implementation." msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "mktime()" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "I<(time_t) -1> can represent a valid time (one second before the Epoch). To " "determine whether B() failed, one must use the Itm_wday> " "field. See the example program in EXAMPLES." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The handling of a non-negative I in B() is poorly " "specified, and passing a value that is incorrect for the time specified " "yields unspecified results. Since B() is one of the few functions " "that knows when DST is in effect, providing a correct value may be " "difficult. One workaround for this is to call B() twice, once with " "I set to zero, and once with I set to a positive value, " "and discarding the results from the call that changes it. If neither call " "changes I then the time specified probably happens during a fall-" "back period where DST begins or ends, and both results are valid but " "represent two different times. If both calls change it, that could indicate " "a fall-forward transition, or some other reason why the time specified does " "not exist." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The specification of time zones and daylight saving time are up to regional " "governments, change often, and may include discontinuities beyond " "I's ability to document a result. For example, a change in the " "timezone definition may cause a clock time to be repeated or skipped without " "a corresponding DST change." msgstr "" #. type: SH #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "EXAMPLES" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "" "The program below defines a wrapper that allows detecting invalid and " "ambiguous times, with B and B, respectively." msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed msgid "The following shell session shows sample runs of the program:" msgstr "" #. type: Plain text #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "" "$\\ B;\n" "-1\n" "$\n" "$\\ B;\n" "$\n" "$\\ B<./a.out 2147483647 2147483647 00 00 00 00 -1>;\n" "a.out: mktime: Value too large for defined data type\n" "$\n" "$\\ B<./a.out 2024 08 23 00 17 53 -1>;\n" "1724365073\n" "$\\ B<./a.out 2024 08 23 00 17 53 0>;\n" "a.out: my_mktime: Invalid argument\n" "1724368673\n" "$\\ B<./a.out 2024 08 23 00 17 53 1>;\n" "1724365073\n" "$\n" "$\\ B<./a.out 2024 02 23 00 17 53 -1>;\n" "1708643873\n" "$\\ B<./a.out 2024 02 23 00 17 53 0>;\n" "1708643873\n" "$\\ B<./a.out 2024 02 23 00 17 53 1>;\n" "a.out: my_mktime: Invalid argument\n" "1708640273\n" "$\n" "$\\ B<./a.out 2023 03 26 02 17 53 -1>;\n" "a.out: my_mktime: Invalid argument\n" "1679793473\n" "$\n" "$\\ B<./a.out 2023 10 29 02 17 53 -1>;\n" "a.out: my_mktime: Name not unique on network\n" "1698542273\n" "$\\ B<./a.out 2023 10 29 02 17 53 0>;\n" "1698542273\n" "$\\ B<./a.out 2023 10 29 02 17 53 1>;\n" "1698538673\n" "$\n" "$\\ B<./a.out 2023 02 29 12 00 00 -1>;\n" "a.out: my_mktime: Invalid argument\n" "1677668400\n" msgstr "" #. type: SS #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron #: opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "Program source: mktime.c" msgstr "" #. type: Plain text #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 #: opensuse-tumbleweed #, no-wrap msgid "" "#include Eerr.hE\n" "#include Eerrno.hE\n" "#include Estdint.hE\n" "#include Estdio.hE\n" "#include Estdlib.hE\n" "#include Estring.hE\n" "#include Etime.hE\n" "\\&\n" "#define is_signed(T) ((T) -1 E 1)\n" "\\&\n" "static time_t my_mktime(struct tm *tp);\n" "\\&\n" "int\n" "main(int argc, char *argv[])\n" "{\n" " char **p;\n" " time_t t;\n" " struct tm tm;\n" "\\&\n" " if (argc != 8) {\n" " fprintf(stderr, \"Usage: %s yyyy mm dd HH MM SS isdst\\[rs]n\", argv[0]);\n" " exit(EXIT_FAILURE);\n" " }\n" "\\&\n" " p = &argv[1];\n" " tm.tm_year = atoi(*p++) - 1900;\n" " tm.tm_mon = atoi(*p++) - 1;\n" " tm.tm_mday = atoi(*p++);\n" " tm.tm_hour = atoi(*p++);\n" " tm.tm_min = atoi(*p++);\n" " tm.tm_sec = atoi(*p++);\n" " tm.tm_isdst = atoi(*p++);\n" "\\&\n" " errno = 0;\n" " tm.tm_wday = -1;\n" " t = my_mktime(&tm);\n" " if (tm.tm_wday == -1)\n" " err(EXIT_FAILURE, \"mktime\");\n" " if (errno == EINVAL || errno == ENOTUNIQ)\n" " warn(\"my_mktime\");\n" "\\&\n" " if (is_signed(time_t))\n" " printf(\"%jd\\[rs]n\", (intmax_t) t);\n" " else\n" " printf(\"%ju\\[rs]n\", (uintmax_t) t);\n" "\\&\n" " exit(EXIT_SUCCESS);\n" "}\n" "\\&\n" "static time_t\n" "my_mktime(struct tm *tp)\n" "{\n" " int e, isdst;\n" " time_t t;\n" " struct tm tm;\n" " unsigned char wday[sizeof(tp-Etm_wday)];\n" "\\&\n" " e = errno;\n" "\\&\n" " tm = *tp;\n" " isdst = tp-Etm_isdst;\n" "\\&\n" " memcpy(wday, &tp-Etm_wday, sizeof(wday));\n" " tp-Etm_wday = -1;\n" " t = mktime(tp);\n" " if (tp-Etm_wday == -1) {\n" " memcpy(&tp-Etm_wday, wday, sizeof(wday));\n" " return -1;\n" " }\n" "\\&\n" " if (isdst == -1)\n" " tm.tm_isdst = tp-Etm_isdst;\n" "\\&\n" " if ( tm.tm_sec != tp-Etm_sec\n" " || tm.tm_min != tp-Etm_min\n" " || tm.tm_hour != tp-Etm_hour\n" " || tm.tm_mday != tp-Etm_mday\n" " || tm.tm_mon != tp-Etm_mon\n" " || tm.tm_year != tp-Etm_year\n" " || tm.tm_isdst != tp-Etm_isdst)\n" " {\n" " errno = EINVAL;\n" " return t;\n" " }\n" "\\&\n" " if (isdst != -1)\n" " goto out;\n" "\\&\n" " tm = *tp;\n" " tm.tm_isdst = !tm.tm_isdst;\n" "\\&\n" " tm.tm_wday = -1;\n" " mktime(&tm);\n" " if (tm.tm_wday == -1)\n" " goto out;\n" "\\&\n" " if (tm.tm_isdst != tp-Etm_isdst) {\n" " errno = ENOTUNIQ;\n" " return t;\n" " }\n" "out:\n" " errno = e;\n" " return t;\n" "}\n" msgstr "" #. #-#-#-#-# archlinux: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. SRC END #. type: SH #. #-#-#-#-# debian-trixie: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. type: SH #. #-#-#-#-# debian-unstable: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. SRC END #. type: SH #. #-#-#-#-# fedora-44: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. SRC END #. type: SH #. #-#-#-#-# fedora-rawhide: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. SRC END #. type: SH #. #-#-#-#-# mageia-cauldron: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. SRC END #. type: SH #. #-#-#-#-# opensuse-leap-16-1: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. SRC END #. type: SH #. #-#-#-#-# opensuse-tumbleweed: ctime.3.pot (PACKAGE VERSION) #-#-#-#-# #. SRC END #. type: SH #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed msgid "" "B(1), B(2), B