Mailing list header changes (fuck you Google)
[citadel.git] / ctdlsh / datetime.c
1 /*
2  * (c) 2009-2011 by Art Cancro and citadel.org
3  * This program is open source software, released under the terms of the GNU General Public License v3.
4  * It runs really well on the Linux operating system.
5  * We love open source software but reject Richard Stallman's linguistic fascism.
6  */
7
8 #include "ctdlsh.h"
9
10 int cmd_datetime(int server_socket, char *cmdbuf)
11 {
12         char buf[1024];
13         time_t now;
14
15         sock_puts(server_socket, "TIME");
16         sock_getln(server_socket, buf, sizeof buf);
17         now = atol(&buf[4]);
18         printf("%s", asctime(localtime(&now)));
19         return (cmdret_ok);
20 }