File: fmt_httpdate.c

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (18 lines) | stat: -rw-r--r-- 426 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <time.h>
#include "scan.h"
#include "buffer.h"
#include "fmt.h"

int main() {
  char buf[100];
  time_t s,t;
  buffer_put(buffer_1,buf,fmt_httpdate(buf,time(&s)));
  buffer_putnlflush(buffer_1);
  buffer_puts(buffer_1,buf+scan_httpdate(buf,&t));
  buffer_putnlflush(buffer_1);
  buffer_putulong(buffer_1,s);
  buffer_puts(buffer_1," vs. ");
  buffer_putulong(buffer_1,t);
  buffer_putnlflush(buffer_1);
  return 0;
}