diff options
| author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
|---|---|---|
| committer | <> | 2013-04-03 16:25:08 +0000 |
| commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
| tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/date/tests/date_modify-1.phpt | |
| download | php2-master.tar.gz | |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/date/tests/date_modify-1.phpt')
| -rw-r--r-- | ext/date/tests/date_modify-1.phpt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/date/tests/date_modify-1.phpt b/ext/date/tests/date_modify-1.phpt new file mode 100644 index 0000000..7707b7f --- /dev/null +++ b/ext/date/tests/date_modify-1.phpt @@ -0,0 +1,30 @@ +--TEST-- +date_modify() function [1] +--SKIPIF-- +<?php if (!function_exists('date_create')) echo "SKIP"; ?> +--FILE-- +<?php +date_default_timezone_set("Pacific/Kwajalein"); +$ts = date_create("Thu Aug 19 1993 23:59:59"); +echo date_format($ts, 'D, d M Y H:i:s T'), "\n"; +$ts->modify("+1 second"); +echo date_format($ts, 'D, d M Y H:i:s T'), "\n"; + +date_default_timezone_set("Europe/Amsterdam"); +$ts = date_create("Sun Mar 27 01:59:59 2005"); +echo date_format($ts, 'D, d M Y H:i:s T'), "\n"; +$ts->modify("+1 second"); +echo date_format($ts, 'D, d M Y H:i:s T'), "\n"; + +$ts = date_create("Sun Oct 30 01:59:59 2005"); +echo date_format($ts, 'D, d M Y H:i:s T'), "\n"; +$ts->modify("+ 1 hour 1 second"); +echo date_format($ts, 'D, d M Y H:i:s T'), "\n"; +?> +--EXPECT-- +Thu, 19 Aug 1993 23:59:59 KWAT +Sat, 21 Aug 1993 00:00:00 MHT +Sun, 27 Mar 2005 01:59:59 CET +Sun, 27 Mar 2005 03:00:00 CEST +Sun, 30 Oct 2005 01:59:59 CEST +Sun, 30 Oct 2005 03:00:00 CET |
