]> granicus.if.org Git - php/commitdiff
Remove useless condition
authorAnatol Belski <ab@php.net>
Fri, 17 Nov 2017 21:51:10 +0000 (22:51 +0100)
committerAnatol Belski <ab@php.net>
Fri, 17 Nov 2017 22:32:03 +0000 (23:32 +0100)
ext/date/php_date.c

index 000199ca810fb4d18a3a7019b3881835559c7c3d..b5d094c83c81785acd7b8187b36725b0f65b3180 100644 (file)
@@ -1336,9 +1336,9 @@ PHPAPI int php_idate(char format, time_t ts, int localtime)
                        offset->is_dst = t->dst;
                        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);
                }