Re: [PATCH v2 2/2] timegm.3: Remove recommendation against use of timegm()

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

 



On 10/17/21 11:02, Alejandro Colomar (man-pages) wrote:

timegm(3) is the only non-error-prone solution in glibc for using UTC times, so it should not be marked as "avoid using".

timegm is not portable, so it's reasonable for the documentation to warn against its use. Perhaps the warning could be made clearer.


- int is unlikely to be >32 bits.

There are a few platforms where int is >32 bits (these are typically ILP64). Although glibc doesn't currently support them, let's not place unnecessary obstacles in the way.


- Even if int ever happened to be 64 bit, this problem would still be something very theoretical

The behavior of the 'zdump' command would change. I imagine it'd affect other commands as well. Admittedly most people wouldn't notice.


if (tm->tm_year > SOME_ARBITRARY_HUGE_VALUE

Let's not impose arbitrary limits.



[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