summaryrefslogtreecommitdiff
path: root/net/belle-sip/files/patch-src-belle_sip_headers_impl.c
blob: 9a3f2fae30c2efb30d7f2b02abce811af1c4ae6d (plain)
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
29
30
31
32
33
34
35
36
37
38
39
--- src/belle_sip_headers_impl.c.orig	2015-10-19 11:43:47 UTC
+++ src/belle_sip_headers_impl.c
@@ -1670,8 +1670,6 @@ BELLESIP_EXPORT time_t belle_sip_header_
 	time_t seconds;
 #ifdef BELLE_SIP_WINDOWS_UNIVERSAL
 	long adjust_timezone;
-#else
-	time_t adjust_timezone;
 #endif
 
 
@@ -1695,25 +1693,11 @@ BELLESIP_EXPORT time_t belle_sip_header_
 success:
 	ret.tm_isdst=0;
 
-#if TARGET_IPHONE_SIMULATOR
-	/* 'timezone' is buggy on iOS simulator, use the timegm() function to convert to UTC timestamp
-	   and discard the adjust timezone value */
-	seconds = timegm(&ret);
-	adjust_timezone = 0;
-#else
-	seconds = mktime(&ret);
-#ifdef BELLE_SIP_WINDOWS_UNIVERSAL
-	_get_timezone(&adjust_timezone);
-#else
-	adjust_timezone = timezone;
-#endif
-#endif
-
 	if (seconds==(time_t)-1){
-		belle_sip_error("mktime() failed: %s",strerror(errno));
+		belle_sip_error("timegm() failed: %s",strerror(errno));
 		return (time_t)-1;
 	}
-	return seconds-(time_t)adjust_timezone;
+	return seconds;
 }
 
 BELLESIP_EXPORT void belle_sip_header_date_set_time(belle_sip_header_date_t *obj, const time_t *utc_time){