/[mailutils]/mailutils/imap4d/fetch.c
ViewVC logotype

Diff of /mailutils/imap4d/fetch.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45 by gray, Sun Mar 23 22:54:47 2003 UTC revision 1.46 by gray, Mon Jun 2 09:12:22 2003 UTC
# Line 337  fetch_flags (struct fetch_command *comma Line 337  fetch_flags (struct fetch_command *comma
337  static int  static int
338  fetch_internaldate (struct fetch_command *command, char **arg ARG_UNUSED)  fetch_internaldate (struct fetch_command *command, char **arg ARG_UNUSED)
339  {  {
340    char date[128], *p;    char date[128];
341    envelope_t env = NULL;    envelope_t env = NULL;
342    struct tm tm;    struct tm tm, *tmp = NULL;
343    mu_timezone tz;    mu_timezone tz;
344    
345    message_get_envelope (command->msg, &env);    message_get_envelope (command->msg, &env);
346    date[0] = '\0';    date[0] = '\0';
347    envelope_date (env, date, sizeof (date), NULL);    if (envelope_date (env, date, sizeof (date), NULL) == 0)
348    p = date;      {
349    mu_parse_ctime_date_time ((const char **) &p, &tm, &tz);        char *p = date;
350    strftime (date, sizeof (date), "%d-%b-%Y %H:%M:%S", &tm);        if (mu_parse_ctime_date_time ((const char **) &p, &tm, &tz) == 0)
351            tmp = &tm;
352        }
353      if (!tmp)
354        {
355          time_t t = time(NULL);
356          tmp = localtime(&t);
357        }
358      strftime (date, sizeof (date), "%d-%b-%Y %H:%M:%S", tmp);
359    util_send ("%s", command->name);    util_send ("%s", command->name);
360    util_send (" \"%s +0000\"", date);    util_send (" \"%s +0000\"", date);
361    return RESP_OK;    return RESP_OK;

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26