summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-03-03 02:54:03 +0100
committerPeter Kokot <peterkokot@gmail.com>2019-03-04 12:13:12 +0100
commita8c3e22d231a9993c253d446ce23425662ac1645 (patch)
tree10cf43503ac31bc6157dcb908fa0c533055dc4b2 /ext/date/php_date.c
parent1c32d751c7cb2abf26b1589f26c80558597e489b (diff)
downloadphp-git-a8c3e22d231a9993c253d446ce23425662ac1645.tar.gz
Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
Changes: - PHP_TM_GMTOFF removed - HAVE_TM_GMTOFF replaced with HAVE_STRUCT_TM_TM_GMTOFF - HAVE_TM_ZONE replaced with HAVE_STRUCT_TM_TM_ZONE - HAVE_TZNAME removed The PHP_TM_GMTOFF macro can be replaced with Autoconf's AC_CHECK_MEMBERS that defines the HAVE_STRUCT_TM_TM_GMTOFF symbol instead of the HAVE_TM_ZONE. The HAVE_TZNAME symbol is not used in current code. The obsolete HAVE_TM_ZONE symbol has been replaced with more proper HAVE_STRUCT_TM_TM_ZONE. These are defined by the AC_STRUCT_TIMEZONE macro.
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index a882071835..58176dbd87 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1682,20 +1682,20 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
ta.tm_yday = timelib_day_of_year(ts->y, ts->m, ts->d);
if (gmt) {
ta.tm_isdst = 0;
-#if HAVE_TM_GMTOFF
+#if HAVE_STRUCT_TM_TM_GMTOFF
ta.tm_gmtoff = 0;
#endif
-#if HAVE_TM_ZONE
+#if HAVE_STRUCT_TM_TM_ZONE
ta.tm_zone = "GMT";
#endif
} else {
offset = timelib_get_time_zone_info(timestamp, tzi);
ta.tm_isdst = offset->is_dst;
-#if HAVE_TM_GMTOFF
+#if HAVE_STRUCT_TM_TM_GMTOFF
ta.tm_gmtoff = offset->offset;
#endif
-#if HAVE_TM_ZONE
+#if HAVE_STRUCT_TM_TM_ZONE
ta.tm_zone = offset->abbr;
#endif
}