On Thu, Jun 14, 2012 at 02:05:54PM +0100, Paul LeoNerd Evans wrote: > I am hesitant to upload this to CPAN, because -suuuurely- something like > it already exists. I can't seem to find it though. ... > I specifically make note of two facts: > > 1) This module specifically handles denormalised values like > POSIX::mktime does; things like 31st Jan == 1st Feb BY DESIGN. > > 2) This module uses the system's own datetime functions of mktime(3) > and gmtime(3); it does not attempt to reinvent them with possibly > incompatible semantics; mkgmtime is always the inverse of gmtime(3). > > If someone can point me at an existing implementation of this, I'll use > that instead of uploading this one. But so far I can't find one, yet it > confuses me that such should still not exist yet.
So, I still haven't got a satisfactory answer to at least part 1 here. The only thing I can find close to it on CPAN is Time::Local, which specifically says that denormalised values give unspecified behaviour. That will be no good to me. I'm also thinking I should rename the module to Time::timegm, providing a single timegm() function, partly because some OSes (notably GNU libc and BSD) already provide a timegm(3) function, so a later version of this module could just provide XS wrapping of that if required. Any further comment? -- Paul "LeoNerd" Evans leon...@leonerd.org.uk ICQ# 4135350 | Registered Linux# 179460 http://www.leonerd.org.uk/
signature.asc
Description: Digital signature