
#include<stdio.h>
#include<arpa/inet.h>

#include<almemsys/almemsys.h>

/*
int mail_time_getr(char [], int, char *);
*/



int mail_time_getr(char buf[], int count, char * zone)
{
time_t t;
struct tm tmbuf;

t = time(NULL);
localtime_r(&t, &tmbuf);

if(20<=count){
   sprintf(buf,"%s, %02d %s %04d %02d:%02d:%02d %s",
      (char *)char_wday(tmbuf.tm_wday),
      tmbuf.tm_mday,
      (char *)char_mon(tmbuf.tm_mon),
      tmbuf.tm_year + 1900,
      tmbuf.tm_hour,
      tmbuf.tm_min,
      tmbuf.tm_sec,
      zone);
   } 
return 0;
}





