Commit Graph

49 Commits

Author SHA1 Message Date
Derick Rethans
546abc4bc6 Integrate timelib 2021.12 2022-05-20 13:18:26 +01:00
Derick Rethans
e4679ef0c2 Fixed date/diff where the difference in hour is less than 1 2021-11-18 13:55:51 +00:00
Derick Rethans
904933e918 Fixed bug #81458: Regression: Incorrect difference after timezone change 2021-11-08 09:40:27 +00:00
Derick Rethans
8426623521 Upgrade timelib to 2021.06
Fixes among others:
. Bug #79580 (date_create_from_format misses leap year).
. Bug #80974 (Wrong diff between 2 dates in different timezones).
. Bug #81097 (DateTimeZone silently falls back to UTC when providing an offset with seconds).
. Bug #81273 (Date interval calculation not correct).
2021-08-08 13:41:33 +01:00
Derick Rethans
091c0920b9 Upgrade timelib to 2021.03 and fix many date/time issues 2021-04-06 20:50:32 +01:00
Derick Rethans
0bc8785b61 Update timelib to 2020.01 2020-08-31 12:03:08 +01:00
Derick Rethans
aae5907cb7 Update timelib to 2018.02 2019-06-30 15:45:13 +01:00
Derick Rethans
5feb53964f Sync with timelib 2017.06 2018-01-31 11:55:35 +00:00
Derick Rethans
584db6f38f Merged PHP-7.0 by hand due to conflicts. 2017-08-15 15:06:18 +01:00
Derick Rethans
55626549d8 Improve support for microseconds with Date/Time
It fixes several bugs:

- Fixed bug #45554 (Inconsistent behavior of the u format char).
- Fixed bug #48225 (DateTime parser doesn't set microseconds for "now").
- Fixed bug #52514 (microseconds are missing in DateTime class).
- Fixed bug #52519 (microseconds in DateInterval are missing).
- Fixed bug #68506 (General DateTime improvments needed for microseconds to become useful).
- Fixed bug #73109 (timelib_meridian doesn't parse dots correctly).
- Fixed bug #73247 (DateTime constructor does not initialise microseconds property).

It also updates timelib to 2016.04, and updates a data mapping file, which
causes changes to the volatile abbreviations tests.
2016-10-05 15:03:06 -04:00
Derick Rethans
f43f6fc39b Fixed bug #63740 (strtotime seems to use both sunday and monday as start of week) 2016-05-18 12:19:11 +01:00
Derick Rethans
822ca45220 Merge in changes in timelib 2016.01 2016-01-29 15:21:55 +01:00
Derick Rethans
96d1d13d87 Update timelib to 2015.02 2015-09-22 08:59:45 +01:00
Derick Rethans
fab5cbab1a Bumb timelib version to 2015.01 2015-09-22 08:41:56 +01:00
Derick Rethans
912e42fc23 Split header reading in 32bit and 64bit variants.
We need to use the 64bit header for the second set of transitions, as there
could be a different amount of transitions. This also opens up the way towards
real 64bit support.
2015-04-29 00:08:28 +01:00
Derick Rethans
cdd2b8a79f Merge whitespace changes that have been made to timelib and PHP-5.6 and master 2015-04-28 15:57:26 +01:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +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
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
d64d9e3351 year++ 2012-09-05 23:08:05 +08:00
Derick Rethans
9b4999881f - Don't show timezone if it wasn't found while parsing. 2010-11-13 14:57:47 +00:00
Derick Rethans
bd184cc572 - Fixed bug #52668 (Iterating over a dateperiod twice is broken). 2010-08-30 15:32:09 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Ilia Alshanetsky
9c97213e0b Fix a small portion of memory leak in bug #46889 2008-12-17 21:32:29 +00:00
Derick Rethans
f533671711 - MFH: Added support for "<xth> <weekday of" and "last <weekday> of" phrases to
be used with months - like in "last saturday of februari 2008".
2008-05-04 20:52:56 +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
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
a61e5f897c - MFH: Support "first/last day of <month>" style texts. 2008-02-03 14:15:07 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Jani Taskinen
bffb8c406c MFH: fix warnings 2007-07-20 23:53:40 +00:00
Derick Rethans
cd34e1c27a - MFH: Let's always use the macro as llabs() requires c99. 2007-07-13 17:49:50 +00:00
Rob Richards
01fe5a0f22 MFH: use macro - llabs not always available on win32 2007-07-13 12:50:00 +00:00
Derick Rethans
4b64dbb9a1 - MFH: Fixed bug #41964 (strtotime returns a timestamp for non-time string of
pattern '(A|a) .+').
- MFH: Fixed bug #41844 (Format returns incorrect number of digits for negative
  years -0001 to -0999).
- MFH: Fixed bug #41842 (Cannot create years < 0100 & negative years with
  date_create or new DateTime).
- MFH: Fixed bug #41709 (strtotime() does not handle 00.00.0000).
- MFH: Fixed bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as
  1999-11-30).
2007-07-12 18:58:00 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Derick Rethans
74dfa9f0ba MFH:
- Implemented Dmitry's const patch.
- Added support for "weekday" as relative item.
- Fixed bug #37368 (Incorrect timestamp returned for strtotime()).
2006-05-14 17:36:05 +00:00
Derick Rethans
4043f77e36 - MFH: Fixed bug #37017 (strtotime fails before 13:00:00 with some time zones
identifiers). (Derick)
- MFH: Fixed bug #36988 (mktime freezes on long numbers). (Derick)
- MFH: Implemented better error and warning handling that is also used for the
  date_parse() function.
- MFH: Fixed problems with "T" in front of a time string was seen as a time
  zone string.
- MFH: Fixed a problem were 5 and 6 character timezone abbreviations where not
  correctly parsed.

Experimental support (All MFH):
- Added the date_parse() function that returns a parsed date/time string
  including warnings and errors.
- Added the timezone_name_from_abbr() function that exposes the guessing
  mechanism that tries to find a timezone identifier from a timezone
  abbreviation and GMT offset.
2006-04-11 18:03:52 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Derick Rethans
7b581f6d19 - MFH: Merged new timelib, which is a bit more cleverer
- MFH: Support "UTC" in strtotime() properly.
- MFH: Added astro code, which is going to form the base for the new sunfuncs.
2005-12-19 13:00:37 +00:00
Derick Rethans
719e78c78f - Fixed bug #34874 and #33546 (Problems with lone daynames). 2005-10-19 21:08:35 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Derick Rethans
d75d455737 - Change memory management so that tzinfo structures can live outside time
structures too.
2005-07-05 18:30:30 +00:00
Derick Rethans
e4860af785 - Reorganize headers, and update TODO. 2005-06-29 19:08:26 +00:00
Derick Rethans
c41145799d - The incoming TS is GMT... but the hole filler wants local time so we
have to convert it.
- Change e-mail address
2005-06-17 14:54:00 +00:00
Derick Rethans
f4de039522 - Rename tl_config.h to timelib_config.h 2005-06-17 12:03:04 +00:00
foobar
a736f99e2f - Improve portability.
# TODO: The standalone lib needs it's own build stuff, pretty much same as
#       Zend has for standalone builds.
2005-06-16 23:12:10 +00:00
Derick Rethans
4ad939be1b - Rename "datetime.c" and "datetime.h" to "timelib.c" and "timelib.h" to
prevent duplicate header names.
2005-06-16 17:12:41 +00:00