File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1574,7 +1574,17 @@ PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
1574
1574
long timestamp = 0 ;
1575
1575
struct tm ta ;
1576
1576
int max_reallocs = 5 ;
1577
- size_t buf_len = 64 , real_len ;
1577
+ #ifdef PHP_WIN32
1578
+ /* VS2012 has a bug where strftime crash with %z and %Z format when the
1579
+ initial buffer is too small. Increasing the buffer size helps in a
1580
+ workaround to fixs longer format strings for this VS version.
1581
+ http://connect.microsoft.com/VisualStudio/feedback/details/759720/vs2012-strftime-crash-with-z-formatting-code
1582
+ */
1583
+ size_t buf_len = 256 ;
1584
+ #else
1585
+ size_t buf_len = 64 ;
1586
+ #endif
1587
+ size_t real_len ;
1578
1588
timelib_time * ts ;
1579
1589
timelib_tzinfo * tzi ;
1580
1590
timelib_time_offset * offset = NULL ;
You can’t perform that action at this time.
0 commit comments