Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
is there some example lying around that will help convert from event.module timestamp+timezone schema to date fields? can anyone suggest an approach?
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedLet me think about this. It should be possible using the date functions in date.inc.
Comment #2
KarenS CreditAttribution: KarenS commentedOK, not sure if this is what you mean, but here is a bit of code to calculate the parts of an event date and get them into formats needed by the date module. I haven't actually tested this, so hopefully I didn't make any typos :-)
Comment #3
KarenS CreditAttribution: KarenS commentedOr actually, the ISO value for the db value of the date could even just be this, since the timestamp is stored as GMT:
Comment #4
KarenS CreditAttribution: KarenS commentedI imagine you're trying to create an import script. I should play with this some more and try to come up with a more complete approach to take an event value out of the database and insert it into a date field. But anyway in the meantime maybe these will help.
Comment #5
KarenS CreditAttribution: KarenS commentedThis is completely untested and is just the beginning of a solution, but something like this might work:
Comment #6
KarenS CreditAttribution: KarenS commentedAlready saw a problem event without trying it. Should be:
Comment #7
KarenS CreditAttribution: KarenS commentedI just committed a very experimental module to the HEAD version of the Date code. It's called Date Copy and it allows you to import date information from either Event nodes or from an iCal feed. This is not production ready and needs testing, but is available for anyone who wants to try it out.
Comment #8
KarenS CreditAttribution: KarenS commentedImport for Events and iCal now seems to be working fairly well in the 5.x version (as an optional included module called Date Copy), so it is now available in both HEAD and 5.x. If someone wants it backported and creates a patch to do it, I'll commit the patch, but otherwise have no plans to backport this to 4.7 because is uses some 5.x FAPI features.
Comment #9
(not verified) CreditAttribution: commentedComment #10
ilbeppe CreditAttribution: ilbeppe commentedAny port for drupal 6?
Comment #11
Andrius Kurtinaitis CreditAttribution: Andrius Kurtinaitis commentedJust installed the date module - its tools do not seem to have any way to import d6 events to d7. Am I wrong?
Comment #12
HongPong CreditAttribution: HongPong commented@andrius when i was trying to solve this, i had to go back into D6 and use the date module event-to-date converter there, and then Date fields upgrade easily into D7. Really pesky!
Comment #13
TheFazz CreditAttribution: TheFazz commented@HongPong - i have been trying to do this... the "date tools-import" event-to-date-convertor creates new node numbers. by doing this, other links gets messed up. additionally, the comments are lost in doing so. how can this be fixed?
I have been using the event module for my karting website for a number of years now. The site is now on drupal 6 and I plan to migrate to 7 soon. the site: http://club.my-kart.org/
not having a properly converted event becomes a problem for my existing events as well as future event scheduling (as my karting group organises regular karting events).