diff src/util.c @ 1805:caa605e70917

[gaim-migrate @ 1815] i have that sting song, the one they play in the mercedes commercial, stuck in my head. what the hell are the words to that song. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 05 May 2001 10:36:08 +0000
parents ee578ccaa5f1
children f15d449b3167
line wrap: on
line diff
--- a/src/util.c	Sat May 05 00:15:58 2001 +0000
+++ b/src/util.c	Sat May 05 10:36:08 2001 +0000
@@ -1503,3 +1503,16 @@
 
 	fclose(fd);
 }
+
+time_t get_time(int year, int month, int day, int hour, int min, int sec)
+{
+	struct tm tm;
+
+	tm.tm_year = year - 1900;
+	tm.tm_mon = month - 1;
+	tm.tm_mday = day;
+	tm.tm_hour = hour;
+	tm.tm_min = min;
+	tm.tm_sec = sec >= 0 ? sec : time(NULL) % 60;
+	return mktime(&tm);
+}