Author
|
Message
|
Georg Franz
|
Wednesday 08 October 2003 10:53:05 am
Hi, it would be nice to have a "birthday" datatype which is able to store dates prior than 1970-1-1. Has anyone developed this datatype? Please write me: emil.webber@magnet.at thanx!
bye, Emil.
Best wishes,
Georg.
--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004
|
Alex Jones
|
Wednesday 08 October 2003 11:12:20 am
I just did a quick test with the regular Date datatype and was able to store and display a date of October 8, 1969. Would it not work for your birthday field? Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
|
Georg Franz
|
Friday 10 October 2003 5:53:34 am
Hi Alex, I've looked at the file ezdatetype.php, it uses mktime() to create a unix-timestamp. So I wonder that you are able to store and display a date prior than 1970-1-1. Am I wrong?
Kind regards, Emil.
Best wishes,
Georg.
--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004
|
Alex Jones
|
Friday 10 October 2003 6:19:35 am
I had thought the same thing which is why I decided to try it. :) The date is still set for October 8, 1969 which is before the UNIX epoch so I don't think it is a problem. Granted ,you may want to try experimenting with earlier dates, but it appears that in principle this isn't an issue. Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
|
Guttorm Flatabø
|
Tuesday 13 July 2004 3:43:19 am
Alex: I would very much like to know on which system and eZ version you managed to do this. I and a load of others posting to the forums haven't managed to store dates prior to 1970. Cheers, Guttorm
|
Kåre Køhler Høvik
|
Tuesday 13 July 2004 4:08:40 am
Dates prior to 1970 does not work on Win32. Please see this page for more information : http://no2.php.net/manual/en/function.mktime.php You can also contact support : http://ez.no/services/support if you want us to solve it.
-- Kåre Høvik
Kåre Høvik
|
Paul Borgermans
|
Tuesday 13 July 2004 5:21:16 am
OK, Any other takers for this? I suggest to use adodb date library for this. Shall we modify the ezdate and ezdatetime or create new extended datatypes for this? I think it is better to change the existing ones unless the performance penalty is too heavy. Needs to be checked too:
- storage and conversion of existing data - template operators Community or paid development? Since it is so general, I do not want to be the only one in case ez systems is going to do this. Ans it should become a feature of the ez publish kernel IMHO Please respond to this thread or email me privately at pborgerm [at] sckcen [dot] be cya -paul
eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans
|
Guttorm Flatabø
|
Tuesday 13 July 2004 5:21:30 am
Thank you very much Kåre! The future looks brighter after all! The two systems where I have tried to use dates prior to 1970 use Fedora core 2 with PHP 4.3.6, and Gentoo Linux (kernel 2.4.22) with PHP 4.3.7, so I conclude that this is not simply a Windows problem. From the nice php.net link you gave it is indicated that any system supporting negative timestamps will support dates ranging from 1901 and 2038, and I guess if the kernel(?) is compiled with time_t as a 64bit signed integer then you can cover the earths history (see http://en.wikipedia.org/wiki/Unix_epoch). Since I require dates from 1800 till today having my systems support negative timestamps would't be good enough, while compiling with time_t as 64 bit is probably not very safe... According to http://phplens.com/phpeverywhere/adodb_date_library glibc does not support negative timestamps anymore, maybe you could test this if you are running Red Hat? As far as I can see using the ADOdb date time libabry found on the former link would be my best shot? If I am successful I will write a HOWTO, but I it looks like I will have to modify the eZp php scripts to use the ADOdb library. Could you perhaps point me to the files that I would need to modify? --Guttorm Guess my answer is a little out of date already....:)
|
Guttorm Flatabø
|
Tuesday 13 July 2004 5:27:36 am
I need this to use eZp at all so if you could point me in the right direction I'd be happy to help, but as you might see from my posts I am not really familiar with php, but on the surface of it it doesn't look too difficult, at least when no migration from previous install is needed. --Guttorm
|
Guttorm Flatabø
|
Tuesday 13 July 2004 5:31:42 am
When I wrote my first reply to this thread I was researching for a new thread that I was going to title "Date datatype supporting dates before 1970", since this thread is appropriate and active I'll just post it here: The date and datatypes only support dates after the UNIX epoch (1970).
A new date datatype that support dates before 1970 has been requested and "promised" since version 2.2. Searching Google for 1970 (-byte) will give you at least:
4 Bug reports
2 Suggestions / feature requests 2 Forum questions
Even the documentation try to use the date datatype for storing dates prior to 1970, should you follow the docs you would fail: http://www.ez.no/ez_publish/documentation/building_an_ez_publish_site/the_members_page/adding_members
|
Paul Forsyth
|
Tuesday 13 July 2004 9:13:41 am
There is this bug too, which seem relevant: http://ez.no/community/bug_reports/eztime_problem_and_inconsistency paul
|
Guttorm Flatabø
|
Wednesday 14 July 2004 6:06:43 am
From the bug report Paul gave it seems like eZ confirms that they are going to fix this for eZP 3.5. Quoting Derick Rethans: "The correct fix would be to update eztime so that it does not use mktime at all [...] we are going to fix this for 3.5" When you are fixing this in the eztime datatype I suppose you'll do the same for ezdate and ezdatetime? If so could you please confirm this? --Guttorm
|
Derick Rethans
|
Wednesday 14 July 2004 6:13:21 am
The bugreport that Paul mentions has little to do with the birthday type. I'm not sure why he though it would be relevant. The bug he mentions is going to be fixed before 3.5, but I can not say anything about the birthday datatype.
|
Paul Forsyth
|
Wednesday 14 July 2004 6:31:24 am
I just wanted to raise awareness of the eztime issue if people were going to be using time fields. Admittedly it might not be totally relevant but its an issue thats on the same field. paul
-- http://www.visionwt.com
|
Guttorm Flatabø
|
Wednesday 14 July 2004 11:18:57 am
The Pear repository also have Date and Time Zone Classes that might be an alternative to the ADOdb library: http://pear.php.net/package/Date/ Björn Dieding has already contributed an extension to integrate PEAR: http://www.ez.no/community/contributions/3rd_party/extension_ezpowerlib_pubsvn --Guttorm
|
Guttorm Flatabø
|
Sunday 18 July 2004 5:43:58 am
Author of the ADOdb Date Time Library had this to say about the PEAR Date and Time classes:
<i>PEAR Date does not use unix timestamps internally, so they are much slower for dates between 1970 and 2038.
Secondly, PEAR Date uses date() to convert unix timestamps to their internal format, so its useless also for unix timestamp date conversions before 1970 and after 2038 too.</i>
See: http://phplens.com/lens/lensforum/msgs.php?id=10110 As of ADOdb Date Time Library v. 0.14 it <i>differs from mktime() in that all parameters are currently compulsory.</i> something going to be fixed in the next version. eZP does not use all parameters. I suppose eZ Systems will not use the library because they need to have the copyright? --Guttorm
|
Tony Wood
|
Friday 23 July 2004 6:32:19 am
As someone who is affected by this birthday datatype problem. Will I never receive a birthday message from any eZ site :( On a serious note, all date in eZ use this format and as such this has far reaching effects for any project using dates before 1970 etc. Although this is not a eZ publish only issue. Is there a recommended workaround from eZ Systems while this system is being fixed? -tony
Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development
Power to the Editor!
Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future
|
Eirik Alfstad Johansen
|
Friday 13 August 2004 5:28:14 am
Hi guys, Any news on this issue? Paul B.: I would be happy to chip in to get ez to develop such a datatype if you haven't resolved this issue already. Have you gotten a quote from them? Sincerely,
Eirik Johansen http://www.netmaking.no/
Sincerely,
Eirik Alfstad Johansen
http://www.netmaking.no/
|
Paul Borgermans
|
Friday 13 August 2004 6:00:02 am
Hi Eirik, No this issue is not resolved. It is on my split short list: either do it in-house, or let ez.no do it on paid development. We are sorting priorities on this and quite a few other features. More by the end of the month, I have not asked for a quote yet. I'v seen some communication by Guttorm on the adodb extended datetime, but I'm unaware of progress Kind regards -paul
eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans
|
Georg Franz
|
Friday 13 August 2004 7:48:34 am
Hi folks,
*tamtam* okay, here it is: the birthday datatype ... http://ez.no/community/contributions/datatypes/birthday_datatype
Kind regards, Emil.
Best wishes,
Georg.
--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004
|