leafnode  1.12.0
About: Leafnode is a store & forward NNTP proxy for small (dialup) sites.
  Fossies Dox: leafnode-1.12.0.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

nntpd_dodate.c
Go to the documentation of this file.
1#include <stdio.h>
2#include "system.h"
3#include "nntpd.h"
4
5void
6dodate(void)
7{
8 time_t t;
9 if (time(&t) == (time_t)-1) {
10 printf("500 Internal error\r\n");
11 } else {
12 struct tm *tm;
13 tm = gmtime(&t);
14 printf("111 %04d%02d%02d%02d%02d%02d\r\n",
15 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
16 tm->tm_hour, tm->tm_min, tm->tm_sec);
17 }
18}
19
20
void dodate(void)
Definition: nntpd_dodate.c:6