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) <ddp...@gmail.com> wrote: > Do you happen to know which versions of Solaris support %Z? > > On Fri, Nov 19, 2010 at 1:15 PM, Serge Dubrouski <serge...@gmail.com> 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.