Derick Rethans
5137cb5f0c
Fixed (some of) add/sub.
...
This worked in PHP 5.4 already, but with the introduction of DateTimeImmutable
this code was not correctly merged.
2014-01-02 12:45:48 +00:00
nikita2206
5f09944662
Fixed bug #65768 : DateTimeImmutable::diff does not work
...
This commit also prevents user classes from directly implementing
DateTimeInterface, because ext/date relies on classes implementing
it to support certain internal structures.
2013-11-29 23:31:07 +01:00
Derick Rethans
88067b6e60
Merge branch 'PHP-5.4' into PHP-5.5
...
Conflicts:
ext/date/php_date.c
2013-11-28 14:30:08 +00:00
Derick Rethans
5d0c526199
Move add/sub to timelib.
2013-11-28 12:02:36 +00:00
Derick Rethans
44a9e6b484
Fixed "Forward Transition" construction of DateTime objects.
...
This fixes the issue in
https://wiki.php.net/rfc/datetime_and_daylight_saving_time#forward_transitions
There is a period during transition to DST where a time (such as 02:30) does
not exist. PHP already calculated the correct timestamp for this, but failed to
"rounded forward" to the existing correct hour value.
2013-11-28 12:02:35 +00:00
Derick Rethans
4587ef569a
Merge branch 'PHP-5.4' into PHP-5.5
2013-11-27 22:01:03 +00:00
Derick Rethans
23ab2575e1
Fixed bug #53879 (DateTime::createFromFormat() fails to parse cookie expiration date)
2013-11-27 21:59:46 +00:00
Stanislav Malyshev
cb47396d46
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
fix memory leak on error (from Coverity scan)
2013-10-21 00:02:21 -07:00
Stanislav Malyshev
f860486de5
fix memory leak on error (from Coverity scan)
2013-10-21 00:01:24 -07:00
Boro Sitnikovski
165f544ae9
Fix bug #65502 : DateTimeImmutable::createFromFormat returns DateTime
...
DateTimeImmutable::createFromFormat should call
date_create_immutable_from_format instead of date_create_from_format
2013-09-12 15:21:45 +02:00
Boro Sitnikovski
d7f5f1ef35
Fix bug #65548 : Comparison for DateTimeImmutable doesn't work
2013-09-12 15:12:16 +02:00
Remi Collet
6fab1caa41
Fixed bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
2013-08-30 10:45:33 +02:00
Remi Collet
a5749eb0cb
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed Bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
2013-08-30 10:43:12 +02:00
Remi Collet
d69513afec
Fixed Bug #65564 stack-buffer-overflow in DateTimeZone stuff caught by AddressSanitizer
2013-08-30 10:42:08 +02:00
Stanislav Malyshev
c0bfccafd2
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fix DateInterval->days value when object was created not from DateTime::diff()
2013-08-24 23:38:54 -07:00
Alexander Moskalev
b378b0b081
Fix DateInterval->days value when object was created not from DateTime::diff()
2013-08-24 23:38:33 -07:00
Christopher Jones
39612afc72
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
Conflicts:
ext/dba/libinifile/inifile.c
2013-08-14 20:43:25 -07:00
Christopher Jones
9ad97cd489
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
2013-08-14 20:36:50 -07:00
Stanislav Malyshev
c793a65690
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
non living code related typo fixes
Conflicts:
Zend/zend_compile.c
2013-08-04 16:06:24 -07:00
Veres Lajos
8d86597d73
non living code related typo fixes
2013-08-04 16:05:36 -07:00
Anatol Belski
5324416b65
Fixed bug #65184 strftime() returns insufficient-length
...
string under multibyte locales
The msdn doc states 'strftime returns the number of characters', but prior
to VS2012 it seems to have returned the number of bytes. Locale independent.
The return is however \0-terminated, so strlen is just fine. The behaivor
seems to be persisting in the later VC++ versions as the corresponding
MSDN ticket is closed 'by design'.
See http://connect.microsoft.com/VisualStudio/feedback/details/766205/vs2012-strftime-has-incorrect-return-value-in-vc-11-with-multibyte-codepages#details
2013-07-03 11:12:46 +02:00
Anatol Belski
0f9cf35315
Backported the fix for bug #53437
2013-06-10 19:52:29 +02:00
Anatol Belski
02f3922047
Fix a BC breach related to bug #53437
...
days and special_amount properties are exported as int again
2013-06-10 17:48:13 +02:00
Anatol Belski
e44849b0f4
Fixed bug #64825 Invalid free unserializing DateTimeZone
2013-05-12 21:29:16 +02:00
David Soria Parra
75cec90d8c
Fix #64712 (Obsolete declarations in php_date.c)
2013-04-26 10:45:08 +02:00
Xinchen Hui
2f6b9b970c
Fix typo (it's in DateTime::__wakeup)
2013-03-31 20:07:14 +08:00
Lonny Kapelushnik
58a8013e5f
Rebased to PHP-5.4
...
Implemented Dmitrys change from df97c3aa0d
Moved the timelib_parse_tz_cor function to ext/date/lib/timelib.c
2013-03-31 10:45:01 +01:00
Lonny Kapelushnik
a4ca01cc2b
Made separate tests for each TZ type
...
Fixed handling of unserializing types 1 and 3
2013-03-31 10:45:00 +01:00
Lonny Kapelushnik
30d0ae42b5
Bug 54567 DateTimeZone serialize/unserialize
...
Make DateTimeZone serializable and implement __set_state
2013-03-31 10:45:00 +01:00
Derick Rethans
68a7fec7af
Make DateTime and DateTimeImmutable siblings.
...
They both implement the DateTimeInterface interface, which specifies the
non-modifying methods of DateTime/DateTimeImmutable.
2013-03-31 10:37:16 +01:00
Anatol Belski
cfd096fd7c
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
Backported fix for bug #62852
2013-03-19 21:22:09 +01:00
Anatol Belski
8d199c7c4f
Backported fix for bug #62852
2013-03-19 21:19:55 +01:00
Anatol Belski
fa3fc711d3
setting plausible default value for struct members
...
especially for unsigned members so they don't casted to max unsigned
2013-03-16 18:29:50 +01:00
Anatol Belski
f8b91d9acf
Fixed bug #62852 Unserialize Invalid Date crash
...
Error handling is the same as in bug #53437 , E_ERROR if we
expect an invalid object.
2013-03-15 21:22:35 +01:00
Anatol Belski
0ee71557ff
Fixed bug #53437 Crash with unserialized DatePeriod instance
2013-03-15 16:59:54 +01:00
Nikita Popov
fcc6611de9
Add support for non-scalar Iterator keys in foreach
...
RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
2013-03-12 17:27:31 +01:00
Anatol Belski
8589dfb6cc
simplified the previous fix for #64359
2013-03-06 16:48:51 +01:00
Anatol Belski
371000a877
Fixed bug #64359 strftime crash with VS2012
2013-03-06 12:37:57 +01:00
Xinchen Hui
4eae087296
Fixed bug #63988 (Two Date tests fail) only for PHP-5.5
2013-01-18 15:49:36 +08:00
Felipe Pena
2f7aafe992
- Fixed ZTS build
2013-01-15 19:59:23 -02:00
Andrey Hristov
5cfa916aad
revert change. now it doesn't compile again...someone should fix ext/date...
2013-01-15 12:20:58 +01:00
Andrey Hristov
acc24d1f9e
Use two dtors thus allow allocation based on the alloc model of the
...
connection.
2013-01-15 12:19:52 +01:00
Derick Rethans
c20911a850
Make DatePeriod support DateTimeImmutable as well.
...
If the start element is a DateTimeImmutable object, then all returned objects
are also DateTimeImmutable objects. If the start element is a DateTime object,
then all returned objects are DateTime objects.
2013-01-14 20:34:58 +00:00
Derick Rethans
a0618139c9
Fixed crash bug when the non-OO interface was used.
2013-01-14 20:34:58 +00:00
Derick Rethans
017b1f7fca
Rename DateTimePoint to DateTimeImmutable.
2013-01-14 20:34:58 +00:00
Derick Rethans
3919d0adf7
Added a few missing TSRMLS_DC/TSRMLS_CC.
2013-01-14 20:34:58 +00:00
Derick Rethans
1cc61f0927
Implemented immutable DateTime objects as the DateTimePoint class.
2013-01-14 20:34:57 +00:00
Derick Rethans
4ff088d061
Merge branch 'PHP-5.4' into PHP-5.5
2013-01-06 15:07:25 +00:00
Derick Rethans
ba35ae32b7
Merge branch 'PHP-5.3' into PHP-5.4
2013-01-06 15:07:13 +00:00
Derick Rethans
ff9c1b12ff
Fixed bug #55397 : Comparsion of incomplete DateTime causes SIGSEGV.
2013-01-06 13:39:34 +00:00
Lars Strojny
9934efff5f
Merge branch 'PHP-5.4' into PHP-5.5
2013-01-06 14:10:07 +01:00
Lars Strojny
d7da1aa694
Coding style, ANSI C compatibility
2013-01-06 14:08:23 +01:00
Lars Strojny
67557fcfce
Bug #63699 : performance improvements for varios ext/date functions
2013-01-06 03:06:09 +01:00
Lars Strojny
f3824ad166
Bug #63699 performance improvements for ext/date by only validating timezone when timezone is set
2013-01-06 02:10:16 +01:00
Xinchen Hui
a666285bc2
Happy New Year
2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009
Happy New Year
2013-01-01 16:28:54 +08:00
Xinchen Hui
a2045ff332
Happy New Year~
2013-01-01 16:02:16 +08:00
Dmitry Stogov
bc7857169a
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Use get_gc instead of hacks of get_properties
2012-12-05 17:59:46 +04:00
Dmitry Stogov
df97c3aa0d
Use get_gc instead of hacks of get_properties
2012-12-05 17:58:36 +04:00
Stanislav Malyshev
1c8f106d9a
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
fix bug #63666 - Poor date() performance
2012-12-04 21:02:55 -08:00
Stanislav Malyshev
fd650ec93e
fix bug #63666 - Poor date() performance
2012-12-04 21:02:09 -08:00
Remi Collet
50fec2bae2
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed Bug #63435 Datetime::format('u') sometimes wrong by 1 microsecond
2012-12-01 10:26:32 +01:00
Remi Collet
92a5e4def0
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
Fixed Bug #63435 Datetime::format('u') sometimes wrong by 1 microsecond
2012-12-01 10:24:02 +01:00
Remi Collet
c2554b4bb4
Fixed Bug #63435 Datetime::format('u') sometimes wrong by 1 microsecond
...
When storing '015700' microseconds in a Datetime object,
Datetime::format('u') returns '015699'
Already known per bug45554 reproducer (also fixed).
2012-12-01 10:20:39 +01:00
Xinchen Hui
d23f9194b1
Merge branch 'PHP-5.4'
2012-09-15 11:33:26 +08:00
Xinchen Hui
2eff69f402
Merge branch 'PHP-5.3' into PHP-5.4
2012-09-15 11:32:08 +08:00
Xinchen Hui
e766f85405
Revert "Fixed bug #62852 (Unserialize invalid DateTime causes crash)"
...
see: http://news.php.net/php.bugs/173451
This reverts commit 46a3f25772
.
2012-09-15 11:26:21 +08:00
Xinchen Hui
f6000a01e2
Capitalize the warning message
2012-09-11 18:09:47 +08:00
Xinchen Hui
79e6635cb6
Rearrange the codes, remove empty lines
2012-09-11 18:02:19 +08:00
Simon Welsh
e06c47ca2a
Provide a specific error message if date.timezone value is invalid.
2012-09-11 21:45:09 +12:00
Xinchen Hui
8693bae624
Merge branch 'PHP-5.3' into PHP-5.4
2012-08-19 18:33:37 +08:00
Reeze Xia
46a3f25772
Fixed bug #62852 (Unserialize invalid DateTime causes crash)
2012-08-19 17:57:45 +08:00
Xinchen Hui
bcf5853eaa
Fixed Bug #62500 (Segfault in DateInterval class when extended)
2012-07-10 18:43:11 +08:00
Xinchen Hui
e3b9b1e6dc
Fixed Bug #62500 (Segfault in DateInterval class when extended)
...
This fix also fixed bug #62508 (Segfault while access a non-string
property of DateInterval object)
2012-07-09 00:25:48 +08:00
Johannes Schlüter
b025b9d0cf
Fix #62432 ReflectionMethod random corrupt memory on high concurrent
...
This fixes the same issue in multiple extensions. This isn't needed
in later branches as 5.4 introduced object_properties_init()
2012-06-27 23:26:33 +02:00
Felipe Pena
e4ca0ed09f
- Year++
2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281
- Year++
2012-01-01 13:15:04 +00:00
Derick Rethans
ac631dd580
- Fixed bug #53502 (strtotime with timezone memory leak).
...
- Fixed bug #52062 (large timestamps with DateTime::getTimestamp and
DateTime::setTimestamp).
- Fixed bug #51994 (date_parse_from_format is parsing invalid date using 'yz'
format).
- Fixed bug #51223 (Seg fault while creating (by unserialization)
DatePeriod).
2011-12-06 06:21:08 +00:00
Derick Rethans
5b2ce47f2e
- Fixed bug #53502 (strtotime with timezone memory leak).
...
- Fixed bug #52062 (large timestamps with DateTime::getTimestamp and
DateTime::setTimestamp).
- Fixed bug #51994 (date_parse_from_format is parsing invalid date using 'yz'
format).
- Fixed bug #51223 (Seg fault while creating (by unserialization)
DatePeriod).
2011-12-06 06:21:08 +00:00
Derick Rethans
58daa3fd3a
- Removed support for putenv("TZ=..") for setting the timezone.
...
- Removed the timezone guessing algorithm in case the timezone isn't set with
date.timezone or date_default_timezone_set(). Instead of a guessed timezone,
"UTC" is now used instead.
2011-09-13 14:48:13 +00:00
Hannes Magnusson
a84c667e0e
Fixed bug#48476
2011-08-30 13:41:57 +00:00
Hannes Magnusson
a6e5d309db
Fixed bug#48476
2011-08-30 13:41:57 +00:00
Gwynne Raskind
04b575f409
possible use without init fixed
2011-08-07 18:12:52 +00:00
Gwynne Raskind
265367e816
possible use without init fixed
2011-08-07 18:12:52 +00:00
Felipe Pena
23e438594d
- Make usage of new PHP_FE_END macro
2011-07-25 11:42:53 +00:00
Felipe Pena
4b30846b50
- Make usage of new PHP_FE_END macro
2011-07-25 11:35:02 +00:00
Felipe Pena
5b85234b37
- Fixed bug #54283 (new DatePeriod(NULL) causes crash)
2011-03-23 01:22:18 +00:00
Felipe Pena
2adf58cfcf
- Fixed bug #54283 (new DatePeriod(NULL) causes crash)
2011-03-23 01:22:18 +00:00
Adam Harvey
334d2df892
Fix bug #54340 (DateTime::add() method bug).
2011-03-22 08:33:22 +00:00
Adam Harvey
991ba13174
Fix bug #54340 (DateTime::add() method bug).
2011-03-22 08:33:22 +00:00
Stanislav Malyshev
1e91069eb4
Fix bug #52290 (setDate, setISODate, setTime works wrong when DateTime created from timestamp)
2011-01-30 10:18:12 +00:00
Stanislav Malyshev
71f3d3793d
Fix bug #52290 (setDate, setISODate, setTime works wrong when DateTime created from timestamp)
2011-01-30 10:18:12 +00:00
Stanislav Malyshev
5bb0a44e06
Fix bug #52808 (Segfault when specifying interval as two dates)
2011-01-30 08:54:53 +00:00
Stanislav Malyshev
7eca674e59
Fix bug #52808 (Segfault when specifying interval as two dates)
2011-01-30 08:54:53 +00:00
Derick Rethans
ecbbe16a8b
- Let's keep this consistent in the whole file.
2011-01-25 15:08:19 +00:00
Derick Rethans
e1a4b5439d
- Let's keep this consistent in the whole file.
2011-01-25 15:08:19 +00:00
Ilia Alshanetsky
8e57ad193b
removed un-used variable
2011-01-24 20:58:09 +00:00
Ilia Alshanetsky
05b2d22a00
removed un-used variable
2011-01-24 20:58:09 +00:00
Stanislav Malyshev
e9d18e09d9
Fixed bug #5273 (Can't use new properties in class extended from DateInterval)
2011-01-24 02:31:48 +00:00
Stanislav Malyshev
1a8b87d2c5
Fixed bug #5273 (Can't use new properties in class extended from DateInterval)
2011-01-24 02:31:48 +00:00
Stanislav Malyshev
4756d7c2c8
Fixed Bug #52063 (DateTime constructor's second argument doesn't have a null default value)
2011-01-24 01:15:41 +00:00
Stanislav Malyshev
a6c0a4e474
Fixed Bug #52063 (DateTime constructor's second argument doesn't have a null default value)
2011-01-24 01:15:41 +00:00
Pierre Joye
0dcf2de5ac
- be sure that we got tzid by adding a default case
2011-01-20 07:05:34 +00:00
Pierre Joye
e0af377bd8
- be sure that we got tzid by adding a default case
2011-01-20 07:05:34 +00:00
Derick Rethans
58810bd055
- Fixed bug #53729 (DatePeriod fails to initialize recurrences on 64bit
...
big-endian systems). (Patch by rein@basefarm.no )
2011-01-12 19:50:09 +00:00
Derick Rethans
8e73b70806
- Fixed bug #53729 (DatePeriod fails to initialize recurrences on 64bit
...
big-endian systems). (Patch by rein@basefarm.no )
2011-01-12 19:50:09 +00:00
Felipe Pena
927bf09c29
- Year++
2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +00:00
Derick Rethans
1cf5713dd3
- Fixed a bug in DateTime->modify() where absolute date/time statements had no
...
effect.
2010-12-15 21:45:25 +00:00
Derick Rethans
3a03c53dbd
- Fixed a bug in DateTime->modify() where absolute date/time statements had no
...
effect.
2010-12-15 21:45:25 +00:00
Felipe Pena
60ad3e54af
- Fix build
2010-11-18 11:33:42 +00:00
Derick Rethans
95a88f04a9
- Fixed the call as well.
2010-11-18 11:28:07 +00:00
Derick Rethans
a2434bb66c
- Revert the ABI changing commit.
2010-11-18 11:24:59 +00:00
Derick Rethans
bb1dbdf62c
- Sync from HEAD.
2010-11-13 16:31:01 +00:00
Kalle Sommer Nielsen
a3161aa091
Removed a TSRMLS_FETCH() call in php_idate() in favor of the TSRMLS macros
2010-09-27 01:19:57 +00:00
Derick Rethans
ab6789a0ef
- Fixed bug #52668 (Iterating over a dateperiod twice is broken).
2010-08-30 15:32:09 +00:00
Derick Rethans
bd184cc572
- Fixed bug #52668 (Iterating over a dateperiod twice is broken).
2010-08-30 15:32:09 +00:00
Sriram Natarajan
4500357df6
- Fixed Bug #51168 (fails to compile with Sun Studio)
...
# C99 standard supports inline keyword and supported by
# by major compilers like GCC, HP C, IBM C and Sun C
2010-06-08 21:23:48 +00:00
Sriram Natarajan
dbddbb6e34
- Fixed Bug #51168 (fails to compile with Sun Studio)
...
# C99 standard supports inline keyword and supported by
# by major compilers like GCC, HP C, IBM C and Sun C
2010-06-08 21:23:48 +00:00
Dmitry Stogov
c5237d82bf
Added caches to eliminate repeatable run-time bindings of functions, classes, constants, methods and properties
2010-05-24 14:11:39 +00:00
Michael Wallner
ad15797925
Fixed bug #51725 (xmlrpc_get_type() returns true on invalid dates). (Mike)
2010-05-12 09:37:25 +00:00
Michael Wallner
0bb08c61f8
Fixed bug #51725 (xmlrpc_get_type() returns true on invalid dates). (Mike)
2010-05-12 09:37:25 +00:00
Dmitry Stogov
336e957951
Fixed bug #49700 (memory leaks in php_date.c if garbage collector is enabled)
2010-04-20 15:41:35 +00:00
Dmitry Stogov
e7d3ec6dee
Fixed bug #49700 (memory leaks in php_date.c if garbage collector is enabled)
2010-04-20 15:41:35 +00:00
Dmitry Stogov
94dd83722b
Changed the structure of op_array.opcodes. The constant values are moved from opcode operands into a separate literal table
2010-04-20 10:57:45 +00:00
Derick Rethans
4da75af2f8
- Expose date-extension object creation externally.
...
- Expose DateTime object initialisation externally.
2010-04-10 20:33:41 +00:00
Derick Rethans
02e4644786
- Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
2010-03-07 17:25:16 +00:00
Derick Rethans
156d780cbd
- Fixed bug #40778 (DateInterval::format("%a") is always zero when an interval
...
is created from an ISO string).
2010-03-07 15:26:39 +00:00
Derick Rethans
f1286280d1
- Fixed bug #50555 (DateTime::sub() allows 'relative' time modifications).
2010-03-07 13:54:46 +00:00
Pierre Joye
da94f0736e
- fix php_date_llabs declaration
2010-02-11 22:37:50 +00:00
Derick Rethans
5a43f269cc
- Fixed bug #49585 (date_format buffer not long enough for >4 digit years).
...
#- Was already partly fixed with my previous commit.
2010-02-10 16:55:40 +00:00
Derick Rethans
8ac4d1190a
- Added a test case for bug #45866
...
- Fixed tests: oo_002, bug46268
- Fixed bug #50930 (Wrong date by php_date.c patch with ancient gcc/glibc
versions).
- Make sure faulty strings passed to DateTime::modify() notify the user.
- Revert fix for bug #50392 as it was fixed wrongly without a proper test case.
- Fixed a bug with the 'r' formatting function as the default buffer size that
was allocated only fit 4 digit years.
2010-02-10 16:23:30 +00:00
Sebastian Bergmann
9ba1e81665
sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
2010-01-03 09:23:27 +00:00
Jani Taskinen
2e5546d71e
- Fixed bug #50266 (conflicting types for llabs)
2009-11-28 00:38:05 +00:00
Pierre Joye
89fec084f1
- #48752 , crash during date parsing with invalid date
2009-10-27 10:41:45 +00:00
Dmitry Stogov
ffb07732f7
Fixed bug #49627 (error_log to specified file does not log time according to date.timezone)
2009-10-05 13:56:49 +00:00
Rasmus Lerdorf
5afa8a23bb
Refix bug #49558 as per bug #49676
2009-09-26 00:53:59 +00:00
Rasmus Lerdorf
d032060ea8
Fix bug #49558
...
And as Colin mentioned in the bug report, this means date_sunrise()
and date_sunset() have been off by 26 seconds in most cases until now.
2009-09-15 20:28:42 +00:00
Kalle Sommer Nielsen
d46ca6d3b5
MFH: Fixed compiler warnings in ext/date
2009-08-05 21:25:39 +00:00
Derick Rethans
9dfb40ea8c
- MFH: Fixed bug #47351 (Memory leak in DateTime).
2009-06-30 16:17:30 +00:00
Johannes Schlüter
6354376924
MFH: Fixed bug #48678 (DateInterval segfaults when unserialising (Ilia)
2009-06-25 15:07:36 +00:00
Ilia Alshanetsky
1c4dafd84d
Revert unrelated bits to the previous commit
2009-06-22 14:24:27 +00:00
Ilia Alshanetsky
bc8e357482
MFB: Fixed bug #48636 (Error compiling of ext/date on netware).
2009-06-22 13:43:14 +00:00
Scott MacVicar
25715c7660
MFH Fix bug #48276 - year is a long long so we need %lld so big endian systems print the correct value.
2009-06-21 22:19:11 +00:00
Hannes Magnusson
b293b35eaa
Fix proto and arginfo
2009-06-21 20:40:53 +00:00
Hannes Magnusson
b685def15a
MFB5.2: "Make this happy on gcc2"
2009-06-17 17:56:17 +00:00
Stanislav Malyshev
2d6377e322
fix for #48247
2009-05-31 21:28:38 +00:00
Hannes Magnusson
39ac962ffd
MFH: Partial fix for bug#48333
2009-05-19 19:23:33 +00:00
Jani Taskinen
59bc60ffbe
- Revert bad compile warning fix which causes compile failures with older glibc
2009-05-19 15:38:07 +00:00
Jani Taskinen
1033af1cb3
MFH: Fixed module loading order and made request shutdown functions also to
...
be loaded in reverse like all other shutdowns are.
2009-05-13 18:48:20 +00:00
Ilia Alshanetsky
e828880281
Fixed compiler warning due to llabs() function
2009-05-05 12:33:39 +00:00
Pierre Joye
b4a46c8693
- cleaner fix
2009-05-04 17:11:22 +00:00
Pierre Joye
7cfcf294a0
- fix build
2009-05-04 16:28:50 +00:00
Derick Rethans
cba1765799
- MFH: Added timezone_version_get() to retrieve the version of the used
...
timezone database.
2009-05-03 19:58:49 +00:00
Derick Rethans
20a359a3fb
- MFH: Fixed bug #45682 (Unable to var_dump(DateInterval)).
2009-05-03 18:46:28 +00:00
Derick Rethans
febc2763dd
- MFH: Fixed bug #48058 (Year formatter goes wrong with out-of-int range).
...
- MFH: Fixed bug #45822 (Near infinite-loops while parsing huge relative offsets).
2009-05-03 18:22:40 +00:00
Kalle Sommer Nielsen
c848df3fbe
MFH: Fixed bug #48088 (Wrong ARG_INFO for OO-API of DateTime)
2009-04-27 14:22:15 +00:00
Felipe Pena
b33f88607a
- MFH: Fixed bug #46108 (DateTime - Memory leak when unserializing)
2009-04-07 20:05:50 +00:00
Hannes Magnusson
12bd41c60a
MFH: Fix protos
2009-03-27 19:22:29 +00:00
Derick Rethans
fb183b1777
- MFH: Elevate no-tz set warning from E_STRICT to E_WARNING.
...
#- [DOC]
2009-01-27 13:48:10 +00:00
Sebastian Bergmann
08659c2dcd
MFH: Bump copyright year, 3 of 3.
2008-12-31 11:15:49 +00:00
Derick Rethans
e5491af3c5
- MFH: Fixed bug #46268 (DateTime::modify() does not reset relative time
...
values).
2008-12-18 20:32:23 +00:00
Derick Rethans
aea378c91c
- MFH: Fixed bug #46889 : Memory leak in strtotime().
2008-12-18 14:55:36 +00:00
Derick Rethans
7a28b876e4
- MFH: Fixed bug #46732 (mktime.year description is wrong).
2008-12-02 18:02:16 +00:00
Etienne Kneuss
3919b16f04
MFH: Fix #46241 (stacked error_handlers, error_handling in general)
2008-11-19 02:00:53 +00:00
Felipe Pena
fc2fb50d09
- MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro
2008-11-17 11:28:01 +00:00
Derick Rethans
f2720ecc34
- MFH: Export DateTime and DateTimeZone class entries so that external
...
extensions can make use of it as well.
2008-11-06 09:45:58 +00:00
Felipe Pena
7a37fa2d6b
- Revert ZEND_BEGIN_ARG_INFO change
2008-11-02 21:19:39 +00:00
Felipe Pena
df10005563
- MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro
2008-10-24 14:35:40 +00:00
Arnaud Le Blanc
1d5ba8bb21
MFH: initialize optional vars
2008-10-21 23:39:15 +00:00
Etienne Kneuss
c77ca4c34a
MFH: Fix error_handling usage in various extensions
2008-08-08 22:07:07 +00:00
Derick Rethans
ad10607c33
- MFH: Fixed bug #45696 (Not all DateTime methods allow method chaining).
2008-08-03 16:45:15 +00:00
Derick Rethans
b5e2564abf
- MFH: Fixed a bug with the YYYY-MM format not resetting the day correctly.
...
- MFH: Fixed a bug in the DateTime->modify() methods, it would not use the
advanced relative time strings.
- MFH: Fixed return values of all the modifying methods, they now properly
return the object itself.
2008-07-30 18:00:44 +00:00
Jani Taskinen
769400ea83
MFH:ws
2008-07-30 08:18:05 +00:00
Dmitry Stogov
cbf2df4d19
Fixed memory leak
2008-07-29 12:56:52 +00:00
Derick Rethans
7537b5b6d7
- MFH: Fixed DateTime::setTimestamp() and added a test for it.
2008-07-27 19:10:23 +00:00
Derick Rethans
f8050d525f
- MFH: Fixed bug #45562 (Creating instance of DatePeriod crashes).
2008-07-20 20:58:51 +00:00
Derick Rethans
42aa7f3dd4
- MFH: Country codes are ISO 3166.
2008-07-19 17:38:29 +00:00
Derick Rethans
84693147d0
- MFH: Added support for selectively listing timezone identifiers by country
...
code through timezone_identifiers_list() / DateTimezone::listIdentifiers().
- MFH: Added timezone_location_get() / DateTimezone::getLocation() for
retrieving location information from timezones.
2008-07-18 14:33:53 +00:00
Derick Rethans
99b31af3f9
- Fixed a segfault - simply a forgotten return;
2008-07-16 12:35:11 +00:00
Derick Rethans
e7ee127f9c
- MFH: Fixed reversed logic.
2008-07-14 17:38:33 +00:00
Derick Rethans
c76ba173a9
- MFH: Added a warning to the error struct in case a parsed-date was found to
...
be invalid.
2008-07-14 17:36:12 +00:00
Felipe Pena
28d91d0cde
- Added arginfo
2008-07-09 12:50:57 +00:00
Derick Rethans
875d013b71
- MFH: Fixed a memleak (Original patch by Hannes Magnusson).
2008-07-08 19:29:18 +00:00
Derick Rethans
484d6b21c0
- Replaced // by /* .. */ comments.
2008-07-08 17:55:59 +00:00
Derick Rethans
198746158f
- MFH: Fixed memory leaks and segfaults, patch by Joe Orton.
...
- MFH: Fixed bug #45038 (Crash when using DateTimeZone object returned by
Date::getTimezone).
2008-07-08 17:41:51 +00:00
Ilia Alshanetsky
9c63b618dd
Kill unused vars
2008-05-07 23:45:28 +00:00
Derick Rethans
c06ab8ca23
- MFH: Added support for using ISO 8601 time intervals to define a DatePeriod
...
iterator.
#- @doc
2008-05-04 10:00:01 +00:00
Derick Rethans
c36edb6a20
- Added support for using an end date to limit the amount of recursions
...
with the DatePeriod iterator.
#- @doc
2008-05-03 10:59:36 +00:00
Derick Rethans
eb64b777fa
- MFH: Fixed an issue in date() where a : was printed for the O modifier after
...
a P modifier was used.
2008-05-02 21:33:05 +00:00
Derick Rethans
149848846d
- MFH: Added DateInterval::createFromDateString() that creates an interval
...
from the relative parts of a date/time string.
- MFH: Fixed an issue where special relative bits were not applied.
2008-05-02 12:49:16 +00:00
Derick Rethans
97b37f253c
- MFH: Rearranged some structures to allow for more powerfull period/intervals.
2008-05-01 16:15:45 +00:00
Derick Rethans
1b435af326
- MFH: Include the starting date by default in the iterator output, but add an
...
option to disable this behavior.
2008-05-01 13:31:22 +00:00
Derick Rethans
8c5274f479
- MFH: Added the DatePeriod class/iterator that iterates over a date time
...
object for a specific number of iterators and applies a DateInterval each
time.
@DOC: More will follow though
2008-05-01 00:12:24 +00:00
Derick Rethans
2047fa858c
- Added new date/time functionality:
...
. support for diffing date/times through date_diff() / DateTime::diff().
. added DateInterval class to represent the difference between two date/times.
. support for parsing ISO intervals for use with DateInterval.
. date_add() / DateTime::add(), date_sub() / DateTime::sub() for applying an
interval to an existing date/time.
- MFH: Fixed bug #44742 (timezone_offset_get() causes segmentation faults).
2008-04-25 12:35:58 +00:00
Derick Rethans
ec5157fe01
- MFH: Fixed a bug in formatting timestamps when DST is active in the default
...
timezone.
2008-03-31 09:11:30 +00:00
Derick Rethans
b23442fc48
- MFH: Fix the DateTimeZone::getTransitions() algorithm.
2008-03-20 19:43:36 +00:00
Ilia Alshanetsky
eb8f83a98e
Remove unused variable
2008-03-16 15:15:21 +00:00
Felipe Pena
57f423156e
Fix build (ZTS)
2008-03-14 17:56:52 +00:00
Derick Rethans
0e9a12d8b1
- MFH: Allow datetime objects to be serialized and woken up.
...
- MFH: Implemented __set_state().
2008-03-14 16:19:52 +00:00
Felipe Pena
84a8bb038a
MFH: New way for check void parameters
2008-03-10 22:15:36 +00:00
Ilia Alshanetsky
33e23bd355
Initialize ts only after successful argument parsing
2008-03-09 18:09:53 +00:00
Ilia Alshanetsky
bbf53bbb04
Fixed a memory leak inside date_get_last_errors() when there are no errors
2008-03-07 02:04:40 +00:00
Derick Rethans
825c3f5ac2
- MFH: Fixed bug #44260 (African timezones missing).
2008-02-27 09:47:35 +00:00
Marcus Boerger
d3e5026564
- MFH Add E_DEPRECATED (Lars Strojny, Felipe Pena, Marcus)
...
[DOC] Finally added deprecation messages
2008-02-23 17:06:22 +00:00
Derick Rethans
3edbc7b0b3
- MFH: Add some missing elements from the return value.
2008-02-13 21:53:12 +00:00
Derick Rethans
3121962808
- MFH: Make timezone_open() work again.
2008-02-02 17:25:54 +00:00
Derick Rethans
81f2dc39bd
- Make whitespace the same as in HEAD.
2008-01-29 20:12:53 +00:00
Derick Rethans
a1180690a4
- MFH: Added two optional parameters to timezone_transitions_get() /
...
DateTimeZone::getTranstions() to limit the range of transitions being
returned.
2008-01-28 21:12:41 +00:00
Derick Rethans
19f6fcce87
- Add missing folding tags.
2008-01-28 20:35:17 +00:00
Derick Rethans
ffbe501ad2
- MFH: Added date_timestamp_get() / DateTime::getTimestamp() to retrieve the
...
Unix timestamp belonging to a date object.
2008-01-28 20:30:51 +00:00
Derick Rethans
dc04a42e5c
- MFH: Update proto
2008-01-27 17:44:29 +00:00
Derick Rethans
216d0cb0ff
- MFH: Added support for selectively listing timezone identifiers through
...
timezone_identifiers_list() / DateTimezone::listIdentifiers().
2008-01-27 17:29:14 +00:00
Derick Rethans
3fb0e425e0
- MFH: Fixed bug #43808 (date_create never fails (even when it should)).
2008-01-17 20:35:02 +00:00
Derick Rethans
2d4db6b8d6
- Fixed bug #43003 (Invalid timezone reported for DateTime objects constructed
...
using a timestamp).
2008-01-17 19:59:00 +00:00
Derick Rethans
e549873c10
- MFH: Added support for abbreviation and offset based timezone specifiers for
...
DateTime::getOffset() and DateTime::getName().
- MFH: Fixed bug #43527 (DateTime created from a timestamp reports environment
timezone).
- MFH: Fixed bug #42190 (Constructing DateTime with TimeZone Indicator
invalidates DateTimeZone).
2008-01-17 18:49:45 +00:00
Derick Rethans
c4fb570ef3
- Fixed TSRM builds.
2008-01-13 18:42:19 +00:00
Derick Rethans
9f979a16bf
- Added new date/time functionality:
...
* date_parse_from_format(): Parse date/time strings according to a format.
* date_create_from_format()/DateTime::createFromFormat(): Create a date/time
object by parsing a date/time string according to a given format.
* date_get_last_errors()/DateTime::getLastErrors(): Return a list of warnings
and errors that were found while parsing a date/time string through:
- strtotime() / new DateTime
- date_create_from_format() / DateTime::createFromFormat()
- date_parse_from_format()
# [DOC]
2008-01-13 15:16:02 +00:00
Sebastian Bergmann
d1dded8751
MFH: Bump copyright year, 2 of 2.
2007-12-31 07:17:19 +00:00
Scott MacVicar
d4bbbc0eab
Change createFromTimestamp to setTimestamp
2007-12-14 14:49:15 +00:00
Scott MacVicar
6f04c5169e
MFH: Add Datetime::createFromTimestamp to allow setting of a unix timestamp without invoking the date parser.
2007-12-14 14:28:36 +00:00
Ilia Alshanetsky
a4e3969215
Fixed bug #43377 (PHP crashes with invalid argument for DateTimeZone)
2007-11-23 00:15:24 +00:00
Yiduo (David) Wang
4b4d634cb9
MFH: Added macros for managing zval refcounts and is_ref statuses
2007-10-07 05:22:07 +00:00
Dmitry Stogov
6c810b0d4c
Improved memory usage by movig constants to read only memory. (Dmitry, Pierre)
2007-09-27 18:00:48 +00:00
Derick Rethans
7588023b65
- MFH: Missing file in previous commit.
2007-07-12 18:59:05 +00:00
Ilia Alshanetsky
a6340d27ae
Final shot at the date issue
2007-06-07 23:16:04 +00:00
Antony Dovgal
c9805e7b92
MFH: check return value of *time_r() functions for NULL
2007-06-07 08:44:41 +00:00
Ilia Alshanetsky
594fe5c398
Fixed typo
2007-06-07 02:21:26 +00:00
Ilia Alshanetsky
d02356922a
Adjust previous patch to work on all compilers
2007-06-06 23:16:34 +00:00
Ilia Alshanetsky
a20bba04d5
Optimize out a loop
2007-06-06 22:58:42 +00:00
Derick Rethans
35d5a196bd
- Fixed bug #39416 (Milliseconds in date()).
2007-04-13 14:09:20 +00:00
Derick Rethans
2e18eb3858
- Fixed bug #39965 (Latitude and longitude are backwards in date_sun_info()).
2007-04-13 08:33:48 +00:00
Michael Wallner
3db2db7159
- fix ws as requested by derick
2007-03-05 14:10:18 +00:00
Michael Wallner
87b02796d8
- fix bug #40691 : add comparison object handler
2007-03-05 14:05:55 +00:00
Ilia Alshanetsky
cc04404b28
snprintf() -> slprintf()
...
# Part 1
2007-02-27 03:04:40 +00:00
Marcus Boerger
50ea26760d
- Avoid sprintf, even when checked copy'n'paste or changes lead to errors
2007-02-24 02:17:47 +00:00
Derick Rethans
e254f976fb
- MFH: Clarify the source of the timezone data.
2007-02-14 19:35:09 +00:00
Derick Rethans
3dcf540547
- Fixed bug #40012 (php_date.c doesnt compile on Netware).
2007-01-03 14:46:23 +00:00
Sebastian Bergmann
4223aa4d5e
MFH: Bump year.
2007-01-01 09:36:18 +00:00
Ilia Alshanetsky
7772e33ace
Small optimization of the date() function
2006-12-22 15:21:34 +00:00
Ilia Alshanetsky
2f291233e6
Fixed bug #39782 (setTime() on a DateTime constructed with a Weekday
...
yields incorrect results).
2006-12-11 21:04:40 +00:00
Hannes Magnusson
c263929002
MFH: throw exception on invalid parameters
2006-11-06 16:11:26 +00:00
Hannes Magnusson
91c604d584
MFH: Add "wrong param" warning to strtotime()
2006-11-03 15:06:51 +00:00
Hannes Magnusson
11c47dc510
MFH: oneliners..
2006-11-03 14:38:45 +00:00
Hannes Magnusson
07a16d19e0
MFH: use PHP_ME_MAPPING rather than ZEND_NAMED_FE/ZEND_FN
2006-11-03 14:36:11 +00:00
Hannes Magnusson
0ce31d14f5
MFH: proots
2006-09-10 17:01:51 +00:00
Hannes Magnusson
b6a5941b97
MFH: date_timezone_set() needs both arguments
...
MFH: throw exception in DateTimeZone::__construct() when no arguments are passed
2006-09-10 16:34:08 +00:00
Nuno Lopes
4cff5db8f4
int->zend_bool where possible
2006-09-05 12:39:20 +00:00
Michael Wallner
eca5331a81
- attempt to fix #38696
2006-09-03 09:09:56 +00:00
Ilia Alshanetsky
d4ff427c55
Fixed bug #38511 , #38473 , #38263 (Fixed session extension request shutdown
...
order to ensure it is shutdown before the extensions it may depend on).
2006-08-22 16:47:23 +00:00