Commit c23e5e1a authored by Per Cederqvist's avatar Per Cederqvist

(prot_a_output_time): Remove stupid Y2k joke.

parent 658c542e
/*
* $Id: prot-a-output.c,v 0.47 1999/05/24 09:34:31 ceder Exp $
* $Id: prot-a-output.c,v 0.48 2000/09/06 21:06:18 ceder Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -35,7 +35,7 @@
#endif
static const char *
rcsid = "$Id: prot-a-output.c,v 0.47 1999/05/24 09:34:31 ceder Exp $";
rcsid = "$Id: prot-a-output.c,v 0.48 2000/09/06 21:06:18 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -760,66 +760,18 @@ prot_a_output_misc_info(Connection *fp,
}
}
/*
void
prot_a_output_time(Connection *fp,
time_t clk)
{
struct tm *t;
t = localtime( &clk );
prot_a_output_ul(fp, t->tm_sec);
prot_a_output_ul(fp, t->tm_min);
prot_a_output_ul(fp, t->tm_hour);
prot_a_output_ul(fp, t->tm_mday);
prot_a_output_ul(fp, t->tm_mon);
prot_a_output_ul(fp, t->tm_year);
prot_a_output_ul(fp, t->tm_wday);
prot_a_output_ul(fp, t->tm_yday);
prot_a_output_ul(fp, t->tm_isdst);
}
*/
void
prot_a_output_time(Connection *fp,
time_t clk)
time_t clk)
{
struct tm *t;
t = localtime( &clk );
/* Please don't tell anyone that you saw this code. It is fun,
mostly harmless, and it only affects as many days as the
server admin wants (default is two.)
Don't spoil the fun */
if (t->tm_year == 100 && t->tm_yday < param.y2k_compat)
{
t->tm_year -= 1; /* Back to 1999 */
t->tm_mday = t->tm_yday + 31; /* December 31+yday */
t->tm_yday += 365; /* yday includes all of 1999 */
t->tm_mon = 11; /* Always december */
}
prot_a_output_ul(fp, t->tm_sec);
prot_a_output_ul(fp, t->tm_min);
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; */
/* } */
/* */
/* >>>>>>> 0.44 */
prot_a_output_ul(fp, t->tm_mday);
prot_a_output_ul(fp, t->tm_mon);
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