changeset 1766:a247305b835f

[gaim-migrate @ 1776] well, that didn't work. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 27 Apr 2001 23:49:00 +0000
parents 2aab66c7a007
children 5461acb8940a
files plugins/icq/gaim_icq.c
diffstat 1 files changed, 4 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/icq/gaim_icq.c	Fri Apr 27 23:42:18 2001 +0000
+++ b/plugins/icq/gaim_icq.c	Fri Apr 27 23:49:00 2001 +0000
@@ -123,19 +123,9 @@
 			unsigned char day, unsigned char month, unsigned short year, const char *data) {
 	struct gaim_connection *gc = find_gaim_conn_by_icq_link(link);
 	char buf[256], *tmp = g_malloc(BUF_LONG);
-	struct tm t;
-	time_t e;
 	g_snprintf(tmp, BUF_LONG, "%s", data);
 	g_snprintf(buf, sizeof buf, "%lu", uin);
-	time(&e);
-	t.tm_sec = e % 60; /* suuuuurrrre.... */
-	t.tm_min = minute;
-	t.tm_hour = hour;
-	t.tm_mday = day;
-	t.tm_mon = month;
-	t.tm_year = year;
-	e = mktime(&t);
-	serv_got_im(gc, buf, tmp, 0, e);
+	serv_got_im(gc, buf, tmp, 0, time((time_t)NULL));
 	g_free(tmp);
 }
 
@@ -188,19 +178,9 @@
 				unsigned short year, const char *url, const char *descr) {
 	struct gaim_connection *gc = find_gaim_conn_by_icq_link(link);
 	char *msg = g_malloc(BUF_LONG), buf[256];
-	struct tm t;
-	time_t e;
 	g_snprintf(msg, BUF_LONG, "<A HREF=\"%s\">%s</A>", url, descr);
 	g_snprintf(buf, 256, "%lu", uin);
-	time(&e);
-	t.tm_sec = e % 60; /* suuuuurrrre.... */
-	t.tm_min = minute;
-	t.tm_hour = hour;
-	t.tm_mday = day;
-	t.tm_mon = month;
-	t.tm_year = year;
-	e = mktime(&t);
-	serv_got_im(gc, buf, msg, 0, e);
+	serv_got_im(gc, buf, msg, 0, time((time_t)NULL));
 	g_free(msg);
 }
 
@@ -238,18 +218,8 @@
 	struct gaim_connection *gc = find_gaim_conn_by_icq_link(link);
 	char *who = g_strdup_printf("ICQ Web Pager: %s (%s)", nick, email);
 	char *what = g_malloc(BUF_LONG);
-	struct tm t;
-	time_t e;
 	g_snprintf(what, BUF_LONG, "%s", msg);
-	time(&e);
-	t.tm_sec = e % 60; /* suuuuurrrre.... */
-	t.tm_min = minute;
-	t.tm_hour = hour;
-	t.tm_mday = day;
-	t.tm_mon = month;
-	t.tm_year = year;
-	e = mktime(&t);
-	serv_got_im(gc, who, what, 0, e);
+	serv_got_im(gc, who, what, 0, time((time_t)NULL));
 	g_free(who);
 	g_free(what);
 }
@@ -260,18 +230,8 @@
 	struct gaim_connection *gc = find_gaim_conn_by_icq_link(link);
 	char *who = g_strdup_printf("ICQ Mail Express: %s (%s)", nick, email);
 	char *what = g_malloc(BUF_LONG);
-	struct tm t;
-	time_t e;
 	g_snprintf(what, BUF_LONG, "%s", msg);
-	time(&e);
-	t.tm_sec = e % 60; /* suuuuurrrre.... */
-	t.tm_min = minute;
-	t.tm_hour = hour;
-	t.tm_mday = day;
-	t.tm_mon = month;
-	t.tm_year = year;
-	e = mktime(&t);
-	serv_got_im(gc, who, what, 0, e);
+	serv_got_im(gc, who, what, 0, time((time_t)NULL));
 	g_free(who);
 	g_free(what);
 }