Re: [PATCH v2] ctime.3: Document how to check errors from mktime(3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-08-23 13:43, Alejandro Colomar wrote:
strftime("%s") would be interesting, but it accepts a struct tm, not a
time_t

That's not a problem, since mktime effectively returns a struct tm as well as a time_t.

You should not use strftime with %s, though, since that might not work on some platforms during fall-back periods. You can use strftime with "%Y-%m-%d %H:%M:%S %z".




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux