There is an existing bug report, at least about the %Z problem: 2861261 - Bug in Perl's POSIX library in OSX 10.1.2
I will attach your message about the other ones. I stumbled on the %Z problem myself, and for my needs, have worked around it by using Date::Format. But I seem to think that the problem is not the system level strftime, since I vaguely remember writing a test C program, and %Z worked there. My sense is that the POSIX interface to strftime is somehow not working fully. For those of you who have built other versions of Perl under Mac OS X and run the tests, POSIX is one of the tests that fails, though not about dates, but something else (which I'm not remembering right of the top of my head). So I suspect there are problems with the POSIX module under Mac OS X, but haven't had the time to further investigate. -------------------------------------------------------------------------- Edward Moy Apple Computer, Inc. [EMAIL PROTECTED] On Friday, April 26, 2002, at 11:47 AM, David Wheeler wrote: > In the process of installing Matt Seargent's Time::Piece module on my OS > X > box (a forthcoming version should support OS X -- the one currently on the > CPAN does not), one of the tests failed. That test used the strftime > system > function to format the date. It returned 'V' for the '%V' format, which, > according to the OS X strftime man page, is > > %V is replaced by the week number of the year (Monday as the first > day of the week) as a decimal number (01-53). If the week > containing January 1 has four or more days in the new year, > then > it is week 1; otherwise it is week 53 of the previous year, and > the next week is week 1. > > Since Time::Piece uses the OS's own strftime function for its work, it > seemed strange to me that one of the formatting characters documented on > the > system just simply wouldn't work. > > So I put together a quick test (using POSIX::strftime) of all the > documented > OS X strftime formatting characters to see what would happen. It turns out > that 4 of the 37 formatting characters fail to do what they document. The > four are: > > '%C' -- Should be '20', for the century, but is 'Fri Dec 14 17:57:37 > 2001' > instead. Was it changed to ctime format but not documented? > > '%u' -- Should be day of week, 5 in the example. Turns up 'u' instead, > which is just strange. > > '%V' -- Should be week of month, 50 in the example. Turns up 'V' > instead, > which is just strange. > > '%Z' -- Should be the time zone, 'PST', but turns up nothing ('') > instead. > > I enclose the script for your perusal. > > So my question is, does anyone know why the OS X strftime function works > differently than it has been documented? Could it be that it has a bug or > two, or that Perl somehow doesn't bind properly (the latter makes no sense > to me). > > FWIW, I tested this script on my i686 RedHat box, and all the tests passed > (excepting some difference necessitated by a different locale). > > Thanks, > > David > > -- > David Wheeler AIM: dwTheory > [EMAIL PROTECTED] ICQ: 15726394 > http://david.wheeler.net/ Yahoo!: dew7e > Jabber: [EMAIL PROTECTED] > > >