Closed (fixed)
Project:
Date
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2006 at 05:13 UTC
Updated:
12 Jan 2011 at 21:10 UTC
Another issue has been posted with the timeline module here: http://drupal.org/node/90594
The idea: to be able to enter dates for historical events before 1970 and the PHP limitation for timestamps (and as far back as historically possible).
It would also be rather good if the date module was able to handle a span of years, decades, and centuries (although, this might be very difficult... I just don't know). It would be nice to have the ability to build effecive timelines with CCK and the timeline module. If wishes were horses...
Comments
Comment #1
Arto commentedSubscribing.
Comment #2
karens commentedYou should be able to use historical dates if you add the adodb date library to the folder (instructions in the module and on the Date project page). For date ranges you can create a node with two historical dates for the from and to dates. I haven't used the timeline module (would love to try it, just haven't had time) so I don't know what else it needs to work.
My experience on historical dates is that the ISO dates work well for historical dates since they don't imply to-the-second precision and you can create dates that have a year and month, but no day, or even a date that has only a year. Also, be sure to indicate you don't want timezone conversion, which won't work on old dates.
Not sure what else I can do to help make this work, but let me know.
Comment #3
karens commentedAlso, on the date ranges, I'm trying to find a way to combine a from and a to date in a single CCK date field so you can do things like calculate the duration of an event because I need that for the Calendar module. That's not working yet because I haven't figured out the best way to do it, but maybe using two different date fields will work for the timeline module, at least for now.
Comment #4
pwolanin commentedHmm, i'm also getting immediately frustrated by this. I'm taking a quick look at the code, and I don't really understand why, if the date is stored as an ISO value in the table, there is any limit on the date range (especially if one doesn't care about timezone correction).
Also, the output of an allowed date such as 1901 shows in the node view as 1969.
Maybe we could work on a much-simplified module to handle just an ISO date field? both MySQl and PostgreSQL seem to have a date data type with native handling of ISO dates and support at least for the years >= 1000
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-type-overview.html
http://www.postgresql.org/docs/7.3/interactive/datetime-appendix.html
http://www.postgresql.org/docs/7.3/interactive/datatype-datetime.html
Comment #5
karens commentedIt sounds like you don't have the adodb date library installed. Without that no date field of any kind can store a value less than 1970 (which sometimes shows up as 1969 because of timezone correction done automatically by php and your server.
You must have the adodb date library installed because native php (at least versions earlier than php 5) cannot manipulate dates earlier than 1970. It has nothing to do with your database or whether or not you are using a specific kind of date field to store the data. If you have the adodb library in the date folder, the program will use it and will be able to handle dates earlier than 1970.
Comment #6
pwolanin commentedSince the library is not included with the 5.x version, I was a little confused. Looking at the module code, it looks as though it's still trying to include this library.
So, I have to download the library separately from the linked external site?
Comment #7
pwolanin commentedOk, downloading the library does seems to fix this. thanks.
Still, this seems like a veritable swiss-army knife of code...
Comment #8
karens commentedYes, the module is complex because many things about the handling of dates are complex, but there are lots of people using and contributing to this code, so it's getting well tested.
The adodb library is not included in cvs or the tarball because that's Drupal policy -- you have to go get the current version yourself. It looks like it's including the file because that's the way it works. If the file is in the folder it gets included and the adodb date functions get used. If not, they don't.
Comment #9
(not verified) commentedComment #10
varkenshand commentedWondering about adodb date library: I started including this in D5, and still have to include it with D6 I noticed. Will it continue to be required in D7? I have the impression that D7 accepts dates before 1970 but I'd like to be on the safe side.
The reason I am asking this: the upgrade of custom CCK fields to D7 seems to become a very risky operation. As the Date field is one of the more complex ones, this makes me tad nervous. The only reason I started to use the Date module in the first place was the need to include dates from the late sixties.