Marcello Vezzelli wrote:
> Hi all,
> there is a bug in SmtpProt.pas (latest ics version just downloaded),
> function Rfc822DateTime, line 2892 and 2907, FormatDateTime function.
> 
>         Result := FormatDateTime('ddd, d mmm yyyy hh:mm:ss', t) +
>                   ' ' + TimeZoneBias
> 
> The time separator : should be put between double quotes, like this:
> 
>         Result := FormatDateTime('ddd, d mmm yyyy hh":"mm":"ss', t) +
>                   ' ' + TimeZoneBias
> 
> Otherwise the system default time separator would be used (in italian
> localization, default time separator is '.').
> 
> Regards

I know this comes a little bit late, but...

In the same function it is tested for English/US format by only
comparing the first day (Sunday). Does anyone know if there is
any other language where the Sunday is also abbreviated as "sun"
but other days or months differ?

     if ShortDayNames[1] = MyShortDayNames[1] then
         Result := FormatDateTime('ddd, d mmm yyyy hh":"mm":"ss', t) +
                   ' ' + TimeZoneBias

Francois, why do you test at all and don't use TFormatSettings
for all those functions? Is it performance? I don't know if the
overloaded FormatDateTime function with TFormatStettings is slower.
At least it makes the code much more readable and shorter (despite
the definition of the TFormatSettings as a constant).

        Veit
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to