Commit 32965bf8 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(prot_a_output_time): Y2k fix.

parent 8c67ec95
/* /*
* $Id: prot-a-output.c,v 0.43 1999/05/12 13:25:20 byers Exp $ * $Id: prot-a-output.c,v 0.44 1999/05/17 22:54:37 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#endif #endif
static const char * static const char *
rcsid = "$Id: prot-a-output.c,v 0.43 1999/05/12 13:25:20 byers Exp $"; rcsid = "$Id: prot-a-output.c,v 0.44 1999/05/17 22:54:37 ceder Exp $";
#include "rcs.h" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -771,6 +771,18 @@ prot_a_output_time(Connection *fp, ...@@ -771,6 +771,18 @@ prot_a_output_time(Connection *fp,
prot_a_output_ul(fp, t->tm_sec); prot_a_output_ul(fp, t->tm_sec);
prot_a_output_ul(fp, t->tm_min); prot_a_output_ul(fp, t->tm_min);
prot_a_output_ul(fp, t->tm_hour); prot_a_output_ul(fp, t->tm_hour);
/* Please don't tell anyone that you saw this code. It is fun,
mostly harmless, and it only affects a single day. Don't spoil
the fun in advance! */
if (t->tm_year == 100 && t->tm_mday == 1 && t->tm_mon == 0
&& t->tm_wday == 6 && t->tm_yday == 1)
{
isc_puts(" 32 11 99 6 366", fp->isc_session);
prot_a_output_ul(fp, t->tm_isdst);
return;
}
prot_a_output_ul(fp, t->tm_mday); prot_a_output_ul(fp, t->tm_mday);
prot_a_output_ul(fp, t->tm_mon); prot_a_output_ul(fp, t->tm_mon);
prot_a_output_ul(fp, t->tm_year); prot_a_output_ul(fp, t->tm_year);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment