[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rfc822 date handling in imap4d/util.c
From: |
Sam Roberts |
Subject: |
Re: rfc822 date handling in imap4d/util.c |
Date: |
Fri, 15 Jun 2001 07:51:47 -0400 |
User-agent: |
Mutt/1.3.16i |
Quoting Sergey Poznyakoff <address@hidden>, who wrote:
> Bonjour,
>
> > This appears to be becomeing the official GNU mailutils greeting, so
> > what do you guys think? Fight the unilingualism of POP3 servers!
> <..snip..>
> > + fprintf (ofile, "+OK Bonjour, POP3 Ready %s\r\n", md5shared);
>
> Je suis d'accord. Votre avis, Alain? Mieux vaudrait mettre:
>
> > + fprintf (ofile, "+OK Bonjour, POP3 est pret %s\r\n", md5shared)
>
> mais ici nous manquons le circonflexe...
C'est vraie, mais le 7-bit ascii seulment est bien. Peut etre:
"+OK Bonjour, POP3 est pre^t %s\r\n"
> It would be very useful to have extern imap_envelope_date() function,
> but it seems you have forgotten the attachment :(
Oops, I'm sorry.
> > Also implemented the timezone, I think.
> There are some problems with it, though. struct tm does not have
> members tm_gmtoff and tm_zone on GNU/Linux (with libc 5) and
I'm running libc6.
> on Solaris. They are present on FreeBSD, though. GNU/Linux's struct tm
> has two fields (long int __tm_gmtoff__ and __const char *__tm_zone__)
> which are not used now. So we are facing a portability problem. We
> could test for existence of these fields in configure.in, but what
> to do when they are absent? I believe we need a workaround. A possible
> solution would be to have our version of mktime, say mu_mktime(),
> which whould take care of TZ properly. What do you think?
That I don't have a book with the algorithms for those kind of date
manipulations.
Pehaps mu_mktime() can be a thin wrapper, it can subtract the
gmtoff from the hour/minute (mod a 24 hour day), then call mktime().
After doing the subtraction, the date, and day of week may be wrong,
however I think that mktime() is supposed to recalculate them
if they are wrong. I'll try and check. Does this seem portable?
Sam
--
Sam Roberts <address@hidden> (Vivez sans temps mort!)
imap-date.diff
Description: Text document