1 |
|
/* |
2 |
< |
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
3 |
< |
* s_misc.c: Yet another miscellaneous functions file. |
2 |
> |
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
3 |
|
* |
4 |
< |
* Copyright (C) 2002 by the past and present ircd coders, and others. |
4 |
> |
* Copyright (c) 1997-2014 ircd-hybrid development team |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
17 |
|
* along with this program; if not, write to the Free Software |
18 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
19 |
|
* USA |
20 |
< |
* |
21 |
< |
* $Id$ |
20 |
> |
*/ |
21 |
> |
|
22 |
> |
/*! \file s_misc.c |
23 |
> |
* \brief Yet another miscellaneous functions file. |
24 |
> |
* \version $Id$ |
25 |
|
*/ |
26 |
|
|
27 |
|
#include "stdinc.h" |
53 |
|
}; |
54 |
|
|
55 |
|
const char * |
56 |
< |
date(time_t lclock) |
56 |
> |
date(time_t lclock) |
57 |
|
{ |
58 |
|
static char buf[80], plus; |
59 |
|
struct tm *lt, *gm; |
60 |
|
struct tm gmbuf; |
61 |
|
int minswest; |
62 |
|
|
63 |
< |
if (!lclock) |
63 |
> |
if (!lclock) |
64 |
|
lclock = CurrentTime; |
65 |
|
gm = gmtime(&lclock); |
66 |
|
memcpy(&gmbuf, gm, sizeof(gmbuf)); |
105 |
|
|
106 |
|
gm = gmtime(&lclock); |
107 |
|
memcpy(&gmbuf, gm, sizeof(gmbuf)); |
108 |
< |
gm = &gmbuf; |
108 |
> |
gm = &gmbuf; |
109 |
|
lt = localtime(&lclock); |
110 |
< |
|
110 |
> |
|
111 |
|
snprintf(buf, sizeof(buf), "%d/%d/%d %02d.%02d", |
112 |
|
lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, |
113 |
|
lt->tm_hour, lt->tm_min); |
126 |
|
|
127 |
|
snprintf(buffer, sizeof(buffer), "%s %s-%d", SSL_get_version(ssl), |
128 |
|
SSL_get_cipher(ssl), bits); |
127 |
– |
|
129 |
|
return buffer; |
130 |
|
} |
131 |
|
#endif |