]> granicus.if.org Git - php/commitdiff
MFH Fix bug #35975 - Session cookie expires date format isn't the most compatible...
authorScott MacVicar <scottmac@php.net>
Thu, 11 Dec 2008 01:21:35 +0000 (01:21 +0000)
committerScott MacVicar <scottmac@php.net>
Thu, 11 Dec 2008 01:21:35 +0000 (01:21 +0000)
ext/session/session.c

index 30afb88cfa969496b4603d00decd214135cbb349..9173be37fbd31a8edc9deade08c9850377052033 100644 (file)
@@ -40,7 +40,7 @@
 #include "ext/standard/md5.h"
 #include "ext/standard/sha1.h"
 #include "ext/standard/php_var.h"
-#include "ext/standard/datetime.h"
+#include "ext/date/php_date.h"
 #include "ext/standard/php_lcg.h"
 #include "ext/standard/url_scanner_ex.h"
 #include "ext/standard/php_rand.h" /* for RAND_MAX */
@@ -1257,7 +1257,7 @@ static void php_session_send_cookie(TSRMLS_D) /* {{{ */
                t = tv.tv_sec + PS(cookie_lifetime);
 
                if (t > 0) {
-                       date_fmt = php_std_date(t TSRMLS_CC);
+                       date_fmt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, t, 0 TSRMLS_CC);
                        smart_str_appends(&ncookie, COOKIE_EXPIRES);
                        smart_str_appends(&ncookie, date_fmt);
                        efree(date_fmt);