And you've been running with this for a bit? And it works as expected? It looks like %z is not posix, but %Z is(?). So a complete switch to %Z across the board might not be a bad idea...
On Fri, Nov 19, 2010 at 2:38 PM, Serge Dubrouski <[email protected]> wrote: > I've checked man pages for strftime on Solaris 8,9,10. All of them > claim to support "%Z". > > On Fri, Nov 19, 2010 at 12:29 PM, dan (ddp) <[email protected]> wrote: >> Do you happen to know which versions of Solaris support %Z? >> >> On Fri, Nov 19, 2010 at 1:15 PM, Serge Dubrouski <[email protected]> wrote: >>> Hello - >>> >>> In src/os_maild/sendmail.c you have following code in 2 places: >>> >>> /* Solaris doesn't have the "%z", so we set the timezone to 0. */ >>> #ifdef SOLARIS >>> strftime(snd_msg, 127, "Date: %a, %d %b %Y %T -0000\r\n",p); >>> #else >>> strftime(snd_msg, 127, "Date: %a, %d %b %Y %T %z\r\n",p); >>> #endif >>> >>> That is true, Solaris doesn't have "%z", but Solaris has "%Z". In >>> current version of code when server works on Solaris all e-mail alerts >>> come in GMT time zone and that's a little bit confusing. Changing that >>> code to following one fixes the problem. May be it makes sense to >>> completely get rid of that #ifdef and replace "%z" with "%Z" for all >>> OSes. >>> >>> /* Solaris doesn't have the "%z", so we set the timezone to 0. */ >>> #ifdef SOLARIS >>> strftime(snd_msg, 127, "Date: %a, %d %b %Y %T %Z\r\n",p); >>> #else >>> strftime(snd_msg, 127, "Date: %a, %d %b %Y %T %z\r\n",p); >>> #endif >>> >>> Thanks. >>> >>> -- >>> Serge Dubrouski. >>> >> > > > > -- > Serge Dubrouski. >
