Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lyskom-server-ceder-1616-generations-topgit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
c23e5e1a
Commit
c23e5e1a
authored
Sep 06, 2000
by
Per Cederqvist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(prot_a_output_time): Remove stupid Y2k joke.
parent
658c542e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
51 deletions
+3
-51
src/server/prot-a-output.c
src/server/prot-a-output.c
+3
-51
No files found.
src/server/prot-a-output.c
View file @
c23e5e1a
/*
* $Id: prot-a-output.c,v 0.4
7 1999/05/24 09:34:31
ceder Exp $
* $Id: prot-a-output.c,v 0.4
8 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.4
7 1999/05/24 09:34:31
ceder Exp $"
;
rcsid
=
"$Id: prot-a-output.c,v 0.4
8 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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment