]> granicus.if.org Git - php/commitdiff
Remove always true condition
authorAnatol Belski <ab@php.net>
Sat, 17 Feb 2018 10:27:15 +0000 (11:27 +0100)
committerAnatol Belski <ab@php.net>
Sat, 17 Feb 2018 12:02:50 +0000 (13:02 +0100)
ext/date/php_date.c

index 5552c027301d86469b3d647589fad1f697a2fb22..6bb1c7d5ccee1c77243bd9a481c75e17f049ea8e 100644 (file)
@@ -1130,9 +1130,9 @@ static zend_string *date_format(char *format, size_t format_len, timelib_time *t
                        offset->is_dst = 0;
                        offset->abbr = timelib_malloc(9); /* GMT±xxxx\0 */
                        snprintf(offset->abbr, 9, "GMT%c%02d%02d",
-                                                 localtime ? ((offset->offset < 0) ? '-' : '+') : '+',
-                                                 localtime ? abs(offset->offset / 3600) : 0,
-                                                 localtime ? abs((offset->offset % 3600) / 60) : 0 );
+                                                 (offset->offset < 0) ? '-' : '+',
+                                                 abs(offset->offset / 3600),
+                                                 abs((offset->offset % 3600) / 60));
                } else {
                        offset = timelib_get_time_zone_info(t->sse, t->tz_info);
                }