diff options
| author | Derick Rethans <derick@php.net> | 2005-06-20 08:47:56 +0000 |
|---|---|---|
| committer | Derick Rethans <derick@php.net> | 2005-06-20 08:47:56 +0000 |
| commit | 643709eb967d841be5111af20535c15be51d7fd6 (patch) | |
| tree | 7a371c5f4246df814826972e1e81ea085a61e2fc | |
| parent | 1a4535f692c2efe91dac08f01f421564d118e9ce (diff) | |
| download | php-git-643709eb967d841be5111af20535c15be51d7fd6.tar.gz | |
- Update news with implemented FRs and added test for those FRs.
| -rw-r--r-- | NEWS | 4 | ||||
| -rw-r--r-- | ext/date/tests/bug21399.phpt | 9 | ||||
| -rw-r--r-- | ext/date/tests/bug26694.phpt | 9 | ||||
| -rw-r--r-- | ext/date/tests/bug28088.phpt | 17 | ||||
| -rw-r--r-- | ext/date/tests/bug29150.phpt | 9 | ||||
| -rw-r--r-- | ext/date/tests/bug29595.phpt | 12 |
6 files changed, 59 insertions, 1 deletions
@@ -4,7 +4,9 @@ PHP NEWS - Improved PHP extension loading mechanism with support for module dependencies and conflicts. (Jani, Dmitry) - Allowed return by reference from internal functions. (Marcus, Andi, Dmitry) -- Rewrote strtotime() with support for timezones and many new formats. (Derick) +- Rewrote strtotime() with support for timezones and many new formats. + Implements feature requests #21399, #26694, #28088, #29150, #29585 and + #29595. (Derick) - Added bindto socket context option. (Ilia) - Added offset parameter to the stream_copy_to_stream() function. (Ilia) - Added offset & length parameters to substr_count() function. (Ilia) diff --git a/ext/date/tests/bug21399.phpt b/ext/date/tests/bug21399.phpt new file mode 100644 index 0000000000..08040bec54 --- /dev/null +++ b/ext/date/tests/bug21399.phpt @@ -0,0 +1,9 @@ +--TEST-- +Bug #21399 (strtotime() request for "YYYYMMDDhhmmss [ZZZ]") +--FILE-- +<?php + putenv("TZ=GMT"); + echo gmdate("Y-m-d H:i:s", strtotime("20050620091407 GMT")); +?> +--EXPECT-- +2005-06-20 09:14:07 diff --git a/ext/date/tests/bug26694.phpt b/ext/date/tests/bug26694.phpt new file mode 100644 index 0000000000..a709d1666c --- /dev/null +++ b/ext/date/tests/bug26694.phpt @@ -0,0 +1,9 @@ +--TEST-- +Bug #26694 (strtotime() request for "Sun, 21 Dec 2003 20:38:33 +0000 GMT") +--FILE-- +<?php + putenv("TZ=GMT"); + echo gmdate("Y-m-d H:i:s", strtotime("Sun, 21 Dec 2003 20:38:33 +0000 GMT")); +?> +--EXPECT-- +2003-12-21 20:38:33 diff --git a/ext/date/tests/bug28088.phpt b/ext/date/tests/bug28088.phpt new file mode 100644 index 0000000000..95866e00be --- /dev/null +++ b/ext/date/tests/bug28088.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #28088 (strtotime() cannot convert 00 hours") +--FILE-- +<?php +putenv("TZ=GMT"); + +echo "The following line rightly shows the correct date time:\n"; +echo gmdate("m/d/y Hi", strtotime("04/04/04 2345")), "\n"; + +echo "But the following line fails to show the correct date time:\n"; +echo gmdate("m/d/y Hi", strtotime("04/04/04 0045"))."\r\n"; +?> +--EXPECT-- +The following line rightly shows the correct date time: +04/04/04 2345 +But the following line fails to show the correct date time: +04/04/04 0045 diff --git a/ext/date/tests/bug29150.phpt b/ext/date/tests/bug29150.phpt new file mode 100644 index 0000000000..274584d050 --- /dev/null +++ b/ext/date/tests/bug29150.phpt @@ -0,0 +1,9 @@ +--TEST-- +Bug #29150 (Roman number format for months) +--FILE-- +<?php + putenv("TZ=GMT"); + echo gmdate("Y-m-d H:i:s", strtotime("20 VI. 2005")); +?> +--EXPECT-- +2005-06-20 00:00:00 diff --git a/ext/date/tests/bug29595.phpt b/ext/date/tests/bug29595.phpt new file mode 100644 index 0000000000..ae3639439b --- /dev/null +++ b/ext/date/tests/bug29595.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #29595 (Roman number format for months) +--FILE-- +<?php + +$from_postgres = '2004-08-09 14:48:27.304809+10'; + +echo strtotime($from_postgres); + +?> +--EXPECT-- +1092026907 |
