Closed (fixed)
Project:
Date
Version:
6.x-2.9
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2006 at 05:29 UTC
Updated:
21 Jan 2013 at 15:16 UTC
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 commentedLet me think about this. It should be possible using the date functions in date.inc.
Comment #2
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 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 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 commentedThis is completely untested and is just the beginning of a solution, but something like this might work:
Comment #6
karens commentedAlready saw a problem event without trying it. Should be:
Comment #7
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 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) commentedComment #10
ilbeppe commentedAny port for drupal 6?
Comment #11
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 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 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).