blob: 329fb88469c20181026d8427e88aa8ee53379bbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
Index: php/ext/date/php_date.c
===================================================================
--- php.orig/ext/date/php_date.c
+++ php/ext/date/php_date.c
@@ -987,7 +987,11 @@ static char* guess_timezone(const timeli
the_time = time(NULL);
ta = php_localtime_r(&the_time, &tmbuf);
if (ta) {
+#ifdef HAVE_TM_GMTOFF
tzid = timelib_timezone_id_from_abbr(ta->tm_zone, ta->tm_gmtoff, ta->tm_isdst);
+#else
+ tzid = timelib_timezone_id_from_abbr("utc", 0, ta->tm_isdst);
+#endif
}
if (! tzid) {
tzid = "UTC";
|