Commit Graph

398 Commits

Author SHA1 Message Date
Derick Rethans
924ae32ddf - Fixed bug #35218 (strtotime no longer ignores timezone comments like "(PST)") 2005-11-17 13:04:31 +00:00
Derick Rethans
18606377dd - Fixed typo 2005-11-17 12:33:36 +00:00
foobar
52747127f8 MFH 2005-11-17 09:58:28 +00:00
Ilia Alshanetsky
cce5e8c9ea Updated tests to use [] instead of {} 2005-11-16 15:13:20 +00:00
Antony Dovgal
23a3fdbf04 MFH: call zend_objects_destroy_object() explicitly
fix segfault when intern->time is NULL
2005-11-15 14:08:03 +00:00
Derick Rethans
719e78c78f - Fixed bug #34874 and #33546 (Problems with lone daynames). 2005-10-19 21:08:35 +00:00
foobar
e264b8a4d3 MFH: Fixed error messages and tests 2005-10-19 11:18:51 +00:00
Derick Rethans
6aed41421e - MFH: Improved error messages a bit. 2005-10-19 07:22:20 +00:00
Derick Rethans
0893e10ac3 - Updated timezone database to version 2005.14. 2005-10-15 18:13:19 +00:00
Derick Rethans
33921efc44 - Fixed timezone guessing on Windows. (Derick, Nuno) 2005-10-15 18:12:29 +00:00
Derick Rethans
cd90395cb6 - MFH: Apperently you can't store NULL pointer values into Zend hashes - god
know why not - so we won't store those in the cache anymore.
2005-10-12 19:49:59 +00:00
Derick Rethans
44205dc58a - MFH: Make sure the tzcache' dtor doesn't cleanup cached misses in the lookup
tables.
2005-10-10 16:42:32 +00:00
Derick Rethans
e3c8bd51de - MFH: Fixed bug #34676: missing support for strtotime("midnight") and
strtotime("noon").
2005-10-08 14:31:17 +00:00
Derick Rethans
5e46f636a5 - MFH: Make the Windows guessing routines actually return the guessed timezone. 2005-10-07 20:32:17 +00:00
Derick Rethans
6df3e40977 - MFH: Change parameter name because NetWare expands "tzname" as a macro to
something else.
2005-10-07 13:33:31 +00:00
Derick Rethans
969f05a709 - MFH: Fixed bug #34771 (strtotime() fails with 1-12am/pm). 2005-10-07 08:09:01 +00:00
Derick Rethans
595ee08653 - MFH: New timezonemap data. 2005-10-07 08:06:40 +00:00
Derick Rethans
e1661efced - Implement correct Windows timezone guessing. 2005-10-05 11:06:56 +00:00
Derick Rethans
33a91ad309 - Fixed typo. 2005-10-05 08:23:39 +00:00
Derick Rethans
c3678550a3 - Implemented tzcache
- Attempt at Windows detection code
2005-10-05 08:20:44 +00:00
Antony Dovgal
262cbbe8d0 include php_version_compare() declaration and eliminate warning 2005-10-03 23:37:10 +00:00
foobar
1c667a88e7 MFH 2005-10-03 20:21:02 +00:00
Derick Rethans
e117d540d1 - MFH: Only use external database when it is newer than the builtin one. 2005-10-03 11:34:51 +00:00
Derick Rethans
afccca77dd - MFH: Allow an external Timezone Database to be used. 2005-10-03 11:17:28 +00:00
Derick Rethans
08b5c498ce - Implemented better timezone guessing algorithm. 2005-10-01 15:04:07 +00:00
Derick Rethans
abcfcd3f2e - MFH: Added date_time_set, date_date_set and date_isodate_set() functions, and
setTime, setDate and setISODate() methods.
2005-09-02 14:58:01 +00:00
Derick Rethans
bb35f045df - MFH: Update timezone database to version "2005m". 2005-09-02 12:32:15 +00:00
Derick Rethans
00566c3949 - MFH: New layout for tz database file. 2005-09-02 11:40:27 +00:00
Derick Rethans
321732227f - Fixed bug #34304 (date() doesn't have a modifier for ISO Week Day). 2005-09-02 09:33:08 +00:00
foobar
a4673bd7b7 Fix test (week numbers below 10 are zero-prefixed now) 2005-09-02 05:17:42 +00:00
Derick Rethans
9057102e6e - MFH: Fixed bug #33414 (Comprehensive list of incorrect days returned after
strtotime() / date() tests).
2005-09-01 12:42:39 +00:00
Derick Rethans
9230473cd3 - Fixed bug #33957 (gmdate('W')/date('W') sometimes returns wrong week number). 2005-08-31 14:29:23 +00:00
Derick Rethans
0e2491f553 - Fixed bug #34302 (date('W') do not return leading zeros for week 1 to 9). 2005-08-30 09:17:09 +00:00
Derick Rethans
d3326d5b26 - MFH: Fixed bug #34087 for real.
- MFH: Windows compile fixes.
2005-08-25 09:47:28 +00:00
Derick Rethans
164b4ad4dd MFH:
- Fixed bug #34087 (strtotime() does not work with date format "Y/m/d").
- Make use of YYMAXFILL.
- Added support for using a . as hour/minute/second separator.
2005-08-24 13:39:34 +00:00
Ilia Alshanetsky
690f2ab5ed Added test for bug #34087 2005-08-17 15:31:57 +00:00
Derick Rethans
d55f456497 - MFH:
- Fixed TSRM issue.
	- Added guessed timezone to phpinfo() output.
	- Initialize is_dst in some cases.
	- Corrected some test cases.
2005-08-09 21:10:22 +00:00
Ilia Alshanetsky
919b0bd5b4 Adjust date("") handling. 2005-08-08 16:49:30 +00:00
Derick Rethans
f3d9a1adbd - Update TODO 2005-08-04 14:59:29 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Derick Rethans
ef28855f4e - Fix test. 2005-08-02 21:16:05 +00:00
Derick Rethans
a5efa0d4c3 - Fixed testcase. 2005-08-01 07:38:20 +00:00
Ilia Alshanetsky
86d81fd743 Fixed bug #33869 (strtotime() problem with "+1days" format). 2005-07-26 22:29:27 +00:00
Ilia Alshanetsky
f2874cf737 Fix for bug #33869 2005-07-26 22:22:06 +00:00
Derick Rethans
8a3d3aefbb - Changed the year parameter so that 0..69 maps to 2000..2069 and 70..100 maps
to 1970..2000, which was in the original code, but not in the documentation.
2005-07-21 10:09:40 +00:00
Dmitry Stogov
3102638061 Fixed tests 2005-07-20 10:06:10 +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
foobar
ada35ab562 fixed typos 2005-07-13 07:04:29 +00:00
foobar
08f8fcf8f4 touch 2005-07-10 17:56:35 +00:00
Marcus Boerger
000ef9c4b5 - use three digit octal character definition 2005-07-10 14:04:20 +00:00
Antony Dovgal
38e4fb09e0 fix tsrm build 2005-07-08 18:16:46 +00:00
Antony Dovgal
39379b8f58 rename php_format_date() to date_format()
add wrapper for date_format() to use it in other extensions
2005-07-08 12:26:30 +00:00
Antony Dovgal
d705522bbe fix #33614 (memory leak in new strftime()) 2005-07-08 10:23:33 +00:00
foobar
71d28a82cf - Fixed stupid bug in PHP_INSTALL_HEADERS() macro: "foo bar" != foo bar
- ext/date/lib/timelib_config.h is also installed now
2005-07-07 23:18:22 +00:00
Derick Rethans
a81e8ae358 - Added testcase for bug #33578. 2005-07-05 21:38:37 +00:00
Derick Rethans
aa5084d17b - Fixed bug #33578 (strtotime() doesn't understand "11 Oct" format). (Derick) 2005-07-05 21:33:33 +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
bf23d8d2b8 - Renamed date_timezone_set/get() to date_default_timezone_set/get().
- Added missing proto's and folding marks.
2005-07-04 21:27:26 +00:00
Ilia Alshanetsky
95e3f66299 Make sure the timezone is NULL, if change operation fails. Ex. memory_limit 2005-07-04 18:13:15 +00:00
Derick Rethans
69feece2bc - Fixed logic. 2005-07-04 14:32:50 +00:00
Wez Furlong
1b9b6312c3 Fix win32 build 2005-07-04 13:22:27 +00:00
Derick Rethans
531c8b9f8c - PHPAPI + static don't mix, obviously. 2005-07-04 13:21:39 +00:00
Derick Rethans
6ba4559b51 - Added testcase for bug #33563 which is already fixed. 2005-07-04 12:41:20 +00:00
Derick Rethans
346c090924 - Fixed bug #33562 (date("") crashes). 2005-07-04 07:48:19 +00:00
Derick Rethans
effc5f1927 - Do not crash when the abbreviation doesn't exist. 2005-07-04 07:16:09 +00:00
foobar
45ae792d08 - Always create the file with correct paths (gdb likes it better like this) 2005-07-04 00:25:39 +00:00
foobar
19b6ffed3c - Always use #ifdef when dealing with HAVE_* defines from AC_CHECK_FUNCS()
- Added check for strftime() also in the timelib configure
2005-07-03 23:30:52 +00:00
Derick Rethans
422f14cb0f - Fixed bug #33536 (strtotime defaults to now even on non time string). 2005-07-03 21:38:54 +00:00
Derick Rethans
8aa3554d19 - Reimplemented time(), getdate() and localtime() functions with new datetime
library.
2005-07-03 20:45:08 +00:00
Derick Rethans
0ef991e5ae - Fixed bug #33532 (Different output for strftime() and date()).
- Re-implemented checkdate(), strftime() and gmstrftime() with the new timelib
  code.
2005-07-03 19:14:55 +00:00
Ilia Alshanetsky
dda7692c87 Avoid strlen() if we know the length. 2005-07-03 18:56:57 +00:00
Derick Rethans
34c4ac7bac - Fixed unintialized variable issue. 2005-07-03 18:49:07 +00:00
Derick Rethans
2e9d063814 - Added fallback to system's timezone setting, but marked with an E_STRICT
error.
- Adjusted tests to use the date_timezone_set() function.
2005-07-03 15:01:29 +00:00
Derick Rethans
d3c83378eb - Move mktime/gmmktime related tests from ext/standard to ext/date. 2005-07-03 14:36:59 +00:00
Derick Rethans
ed02f202f0 - Fixed bug #30096 (gmmktime does not return the corrent time).
- Re-implemented mktime and gmmktime with new date time library.
- Added testcase for bug #30096, updated test cases for E_STRICT warning of
  is_dst parameter usage for mktime/gmmktime.
2005-07-03 14:27:31 +00:00
Derick Rethans
2b47899981 - Overhauled selecting the correct timezone. The timezone set with
"date_timezone_set" override the TZ environment variable, which on its turn
  overrides the date.timezone setting. If none of the three is set, we fallback
  to UTC.
- Added "date_timezone_set" function to set the timezone that the date
  functions will use.
2005-07-02 21:19:25 +00:00
Edin Kadribasic
e70b3a94f4 Use timelib types.
(Fixes compilation on older Microsoft compilers)
2005-07-01 08:59:57 +00:00
Derick Rethans
e6820914ff - parse_date.c is a generated file, updated parse_date.re and regenerated
parse_date.c.
2005-07-01 07:18:43 +00:00
Ilia Alshanetsky
eab2cdedd3 Fixed memory leak. 2005-06-30 23:33:37 +00:00
Frank M. Kromann
4ae7321f3e Fix Win32 build 2005-06-30 23:03:36 +00:00
Frank M. Kromann
6833acff23 Fix ZTS build 2005-06-30 22:49:47 +00:00
Ilia Alshanetsky
f7fe18dde4 Fixed compiler warnings. 2005-06-30 22:47:39 +00:00
Ilia Alshanetsky
7575ef4778 Fixed memory leak on error inside php_date(). 2005-06-30 22:44:28 +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
33218e6b24 - Make the Netware guys happy by removing the config.nw.h define. 2005-06-30 06:40:57 +00:00
Derick Rethans
e4860af785 - Reorganize headers, and update TODO. 2005-06-29 19:08:26 +00:00
Derick Rethans
e7de7ff9e2 - Added support for negative timestamps with the @<number> format. (Patch by
Nuno Lopes)
2005-06-29 19:07:06 +00:00
Derick Rethans
aa202a7e93 - Make sure the already set "TZ" environment doesn't mess up the tests. 2005-06-29 19:00:35 +00:00
Derick Rethans
a8949a5f0e - Added testcases for bug #14561 and #26090 and updated NEWS with those
fixed bug nr's.
2005-06-28 21:49:35 +00:00
Derick Rethans
7e58c96022 - Fixed bug #33415 and added test cases for #33414 and #33415. 2005-06-28 21:37:36 +00:00
Derick Rethans
dcca4db029 - Fixed bug #33433 (strtoll not available on Tru64). 2005-06-28 18:05:59 +00:00
Derick Rethans
28e76fe7f4 - Implemented binary search for timezone abbreviations and timezone identifier
lookups. (Based on a patch by Nuno Lopes)
2005-06-28 17:56:47 +00:00
Derick Rethans
d995df614c - Fixed Rasmus' problem with Jan.14, 2004. 2005-06-21 17:43:28 +00:00
Derick Rethans
d99e8894ff - Update TODO. 2005-06-20 11:08:28 +00:00
Derick Rethans
610fd92ee7 - Make this work on big endian systems too.
- Added an additional malloc() check.
2005-06-20 11:07:53 +00:00
foobar
eb9a7a76e6 - Added AC_TIMELIB_C_BIGENDIAN
# No need to add it to config.m4, it's run in PHP configure.in already.
# Only added here so that the  standalone configure.in (to be added later)
# can use it.
2005-06-20 11:01:07 +00:00
Derick Rethans
643709eb96 - Update news with implemented FRs and added test for those FRs. 2005-06-20 08:47:56 +00:00
Derick Rethans
1a4535f692 - Implemented FR #29585 (Support week numbers in strtotime()) 2005-06-20 08:46:09 +00:00
Derick Rethans
f0d8e67ff5 - Update README, we require 0.9.8 now. 2005-06-20 08:39:45 +00:00
foobar
174e96246b Install headers too 2005-06-19 23:36:18 +00:00
Derick Rethans
3cdc895213 - Added backward compability wrapper "php_parse_date()".
- Changed WDDX extension to use new date parsing code.
- Removed all remnants to the old parser.
#- I hope that I didn't break the .dsp's...
2005-06-19 22:15:27 +00:00
Derick Rethans
eab2cbf494 - Fixed test - strtotime() uses GMT if no TZ environment variable is set and if
no explicit timezone abbreviation (CEST) or timezone identifier
  (Europe/Amsterdam) is set.
2005-06-19 16:13:34 +00:00
Derick Rethans
aeb1744011 - Add #20382 to the list, and expand testcase again. 2005-06-19 15:01:43 +00:00
Sebastian Bergmann
63a30ff1f0 ZTS fix. 2005-06-19 05:28:39 +00:00
Derick Rethans
3e7446f0e7 - Allow default timezone to be set with the .ini setting "date.timezone". 2005-06-18 20:23:19 +00:00
Derick Rethans
635ea0d5fd - Update NEWS with bugfix happyness.
- Update TODO file for ext/date. No known bugs currently.
2005-06-18 19:40:31 +00:00
Derick Rethans
c2b34e208a - Added testcase for bug #28024. 2005-06-18 19:39:19 +00:00
Derick Rethans
9f2283b8a0 - Fixed bug in tm2unixtime where the wanted date was in the transition time
between two zones.
#- In this case the wanted date actually didn't exist, and that wasn't
#  handled correctly.
2005-06-18 19:23:58 +00:00
Derick Rethans
7299ff3b04 - Expand test cases for bug #32086 and #32555. 2005-06-18 19:21:10 +00:00
foobar
20cc9e3939 some more things to do 2005-06-18 18:11:33 +00:00
Derick Rethans
b70466417e - Add another test for bug #20382. 2005-06-18 14:11:15 +00:00
Derick Rethans
3ad7c1ad4a - If the ts is smaller than the first transition time, use the last one
in the list.
#- This seems consistent with how "zdump" works, although I'm not 100% sure if
#  it's correct.
2005-06-18 11:58:18 +00:00
Derick Rethans
30efc9f68e - Fixed a problem where the timestamp we are looking up a TZ info structure for
was in the last record in the tz database.
- Fixed problem in test case.
2005-06-18 11:15:29 +00:00
Derick Rethans
cbc98fb3c0 - Fixed test case
#- Still not sure why the first TS is incorrect...
2005-06-18 10:25:40 +00:00
Derick Rethans
25168fffd5 - Fix test case.
#- Bug might actually be in date() rendering things wrong, but that code
#  is not yet replaced.
2005-06-17 22:45:31 +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
2492892fde - Add a couple of test files, which all still fail. 2005-06-17 14:21:53 +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
Frank M. Kromann
37d672d2a3 Attempt to fix win32 build by creating the missing hader file 2005-06-17 05:10:12 +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
foobar
a87d9876cf nuke unused entries 2005-06-16 22:03:04 +00:00
foobar
ab285a85fd Fix VPATH build (again) 2005-06-16 21:23:16 +00:00
Derick Rethans
ca16776087 - Fixed headers for FreeBSD
- Moved from ntohl to own macro
- Export timelib_dump_tzinfo
2005-06-16 18:34:42 +00:00
Derick Rethans
c53cdf6dd8 - Added include dir. 2005-06-16 18:15:30 +00:00
Derick Rethans
fb2b1606ba - Fix up tests, remove windows specific test. 2005-06-16 18:13:40 +00:00
Derick Rethans
b7ea5dc5f4 - Move strtotime() related testcases to ext/date/tests. 2005-06-16 17:35:08 +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
Derick Rethans
7c264559b2 - Fixed a regression with "last saturday" 2005-06-16 13:30:26 +00:00
Ilia Alshanetsky
73d503471c Fixed memory leak. 2005-06-15 23:42:55 +00:00
Ilia Alshanetsky
694585e1a8 Avoid double-free. 2005-06-15 23:30:20 +00:00
Ilia Alshanetsky
c68b34c40f Added test for bug #33056. 2005-06-15 23:24:28 +00:00
Derick Rethans
eb8b4fd4a1 - Make it compile cleanly with MS VC++ too, which is completely anal in some
cases.
2005-06-15 11:01:07 +00:00
Derick Rethans
e56a091bf3 - Commit re-generated parser. 2005-06-15 09:09:04 +00:00
Edin Kadribasic
d00b6bc170 Date will never be compiled as shared so this is not needed 2005-06-15 09:05:00 +00:00
Edin Kadribasic
cc33e8f536 Nuke PHP_ prefix from timelib 2005-06-15 09:02:28 +00:00
Edin Kadribasic
d1974bad1b Made date obligatory and static 2005-06-15 08:44:23 +00:00
Derick Rethans
6d7667267b - Hide the "Unexpected character..." message for now. 2005-06-15 07:58:21 +00:00
Derick Rethans
318c7aead7 - Commit fixed .c file with fixed re2c. 2005-06-15 07:43:05 +00:00
Derick Rethans
952a2c8234 - Whitespace and regenerate the .c file with my re2c. 2005-06-15 07:23:27 +00:00
Derick Rethans
f858c193b6 - Rename macro to TIMELIB_TIME_FREE
#- Please do not use PHP_ prefixes as this library will also be packaged
#  outside of PHP.
2005-06-15 07:15:38 +00:00
Edin Kadribasic
61d132cddc Export symbols 2005-06-15 00:23:14 +00:00
Edin Kadribasic
dd9698a6cb Touch + manual fix for re2c bug where it forgets {} in static int scan() 2005-06-15 00:17:41 +00:00
Edin Kadribasic
289997715a Make it compile on windows 2005-06-15 00:11:29 +00:00
Ilia Alshanetsky
9392a1c9de Fixed memory leaks. 2005-06-14 23:40:57 +00:00
foobar
32b3d10174 fix VPATH builds + nuked unnecessary lines 2005-06-14 22:50:55 +00:00
Edin Kadribasic
cde34a07b7 Added win32 build file 2005-06-14 22:25:48 +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