summaryrefslogtreecommitdiff
path: root/net-p2p/libfreenet/files/patch-client_util.c
blob: 3fd891db31227be261fa65e2ee0b154ff237d13b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- client_util.c.orig	Wed Mar 28 03:27:38 2001
+++ client_util.c	Fri Mar 15 07:54:32 2002
@@ -37,7 +37,7 @@
 #endif
 
 
-long blstr2time(char *baseline);
+time_t blstr2time(char *baseline);
 int timediff();
 
 
@@ -60,13 +60,14 @@
 
 int timediff ()
 {
+    struct tm *tmp;
     long t = time(NULL);
 
     /* We are calling localtime here for its side-effect of setting
        the timezone global appropriately.  I have no proof that this
        even happens on cygwin.  Please, just let me die. */
-    localtime(&t);
-    return (FN_TIMEZONE / 3600);
+    tmp = localtime(&t);
+    return (tmp->tm_gmtoff / 3600);
 }