Commit Graph

44 Commits

Author SHA1 Message Date
Derick Rethans
06d4c70e51 Integrate timelib 2022.02
- Fixed #124: Can't parse INT_MIN
- Added a new API, timelib_get_time_zone_offset_info, which reduces allocation
  speeding up algorithms (Alberto Massari)
- Accelerate the do_range_limit_days algorythm by advancing multiple months in
  a single call (Alberto Massari)

Including fixes from 2021.17:

- Fixed 'const' and other compiler warnings
- Use new 'PACKRAT' format to prevent old timestamps from becoming incorrect
- New 2022b data file
- Fixed PHP GH-9165: strtotime translates a date-time with DST/non-DST hour
  differently
2022-09-14 16:33:05 +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
aae5907cb7 Update timelib to 2018.02 2019-06-30 15:45:13 +01:00
Derick Rethans
09340ea9b9 Fixed bug #75577: DateTime::createFromFormat does not accept 'v' format specifier, by updating timelib to 2018.01alpha2 2018-10-09 11:08:40 +01:00
Derick Rethans
c0383b5039 Upgrade timelib to 2017.05beta9 2017-09-04 22:45:34 +01:00
Derick Rethans
584db6f38f Merged PHP-7.0 by hand due to conflicts. 2017-08-15 15:06:18 +01:00
Derick Rethans
d28df113d5 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-12 20:19:02 +00:00
Derick Rethans
f0519f4837 Upgrade timelib to 2017.01
This fixes:

- Fixed bug #72719 (Relative datetime format ignores weekday on sundays only).
- Fixed bug #73294 (DateTime wrong when date string is negative).
- Fixed bug #73489 (wrong timestamp when call setTimeZone multi times with UTC
  offset).
- Fixed bug #73858 (first/last day of' flag is not being reset).
- Fixed bug #73942 ($date->modify('Friday this week') doesn't return a Friday
  if $date is a Sunday).
- Fixed bug #74057 (wrong day when using "this week" in strtotime).
2017-02-12 20:17:01 +00: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
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
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
Derick Rethans
22dba2f5f3 Fixed bug #45543: DateTime::setTimezone can not set timezones without ID. 2014-01-26 14:01:58 +01:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Derick Rethans
261c6b31ca Always reset those parameters. 2013-11-28 12:02:35 +00:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
d64d9e3351 year++ 2012-09-05 23:08:05 +08:00
Derick Rethans
7411ae09f5 - Fixed bug #60236 (TLA timezone dates are not converted properly from
timestamp).
- Fixed bug #55253 (DateTime::add() and sub() result -1 hour on objects with
  time zone type 2).

And fixed some test cases.
2011-11-24 17:13:47 +00:00
Ilia Alshanetsky
02bdb521e2 Optimize unix timestamp to date-string conversion for very high year values 2011-01-05 04:13:23 +00:00
Scott MacVicar
27177c9868 Change DEBUG() to TIMELIB_DEBUG(), there are potential conflicts with other libraries that also use this. 2011-01-03 19:24:04 +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
Derick Rethans
e22155e848 - MFH: Fixing returned offset.
- MFH: Algorithm optimization.
2008-04-07 17:44:03 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +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
7975b4eb0e - MFH: Fixed windows compile error. 2006-05-15 08:54:16 +00:00
Derick Rethans
88268c6bcc - MFH: Fixed bug #35887 (wddx_deserialize not parsing dateTime fields properly).
- MFH: Fixed bug #35885 (strtotime("NOW") no longer works).
- MFH: Fixed bug #33789 (Many Problems with SunFuncs).
- MFH: Fixed bug #33671 (sun_rise and sun_set don't return a GMT timestamp if one
  passes an offset).
- MFH: Fixed bug #32820 (date_sunrise and date_sunset don't handle GMT offset
  well).
- MFH: Fixed bug #30937 (date_sunrise() & date_sunset() don't handle endless
  day/night at high latitudes).
2006-01-04 21:31:35 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Derick Rethans
97ec0f3db5 - Fixed bug #35699 (date() can't handle leap years before 1970). 2005-12-20 15:58:01 +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
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Derick Rethans
e6c1ff254d - Fixed bug #33578 (strtotime() problem with "Oct17" format).
- Fixed problems with lone years in strtotime().
- Added functions to timelib to get a list of all abbreviations and timezone
  identifiers.
- Fixed problems with parsed dates that only have GMT offsets associated
  with them.
- Fixed a Windows compile problem.
- Added special constants for different often used date formats (DATE_ISO8601,
  DATE_RFC822, DATE_RSS etc).
- Fixed date_default_timezone_get() to return the guessed timezone if none
  was set yet with date_default_timezone_set().
- Added experimental support for Date/Timezone objects as per specifications.
2005-07-20 08:31:02 +00:00
Derick Rethans
e155585e6e - Reimplemented date and gmdate with new timelib code.
- Removed old date/gmdate implementations.
- Moved date() related testcases to ext/date/tests.
- Implemented bug #33452.
- Fixed testcase for bug #27719 - there is no timezone called "EST5DST".
2005-06-30 21:38:06 +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
65530de209 - Simplify code a little. 2005-06-17 14:11:12 +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
Edin Kadribasic
cc33e8f536 Nuke PHP_ prefix from timelib 2005-06-15 09:02:28 +00:00
Edin Kadribasic
289997715a Make it compile on windows 2005-06-15 00:11:29 +00:00
Derick Rethans
4fb4cac65c - Add my new timelib and ext/date. For now only strtotime() makes use of this. 2005-06-14 21:32:29 +00:00