Summary: | JJ: exported BDAY VCard field is too precise | ||
---|---|---|---|
Product: | [Unmaintained] kab3 | Reporter: | Tristan Miller <psychonaut> |
Component: | general | Assignee: | Tobias Koenig <tokoe> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | jtamate |
Priority: | NOR | Keywords: | triaged |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Tristan Miller
2005-12-14 00:42:10 UTC
Hi Tristian, no idea which version of rfc2426 you read, but in my copy BDAY is allowed to have a time attribute. So to be fully vcard compliant we'll keep it. http://rfc.net/rfc2426.html#s3.1.5 Ciao, Tobias I think you may have misread my bug report. I am not claiming that BDAY is not allowed to have a time attribute; I am saying that kaddressbook is writing an *incorrect* time attribute. According to RFC 2426, the the time attribute for the BDAY field is optional. Since kaddressbook does not prompt for a time when setting a contact's birthdate, it is better to leave off the time attribute than to write an arbitrary value. Hi Tristian, I didn't missread your report, but the vCard is created by libkabc, so KAddressBook is not the only component which creates vCards. So there could be another applications which sets the time of the birthdate, in this case the behaviour is absolutely right. I can't see the problem that the time is stored, since most applications will show only the date anyway. In 4.0 we can think about adding an advanced input field for birthdate to specify the time as well, but for 3.5 it's to late (GUI freeze). Ciao, Tobias From your latest response, I think you are indeed continuing to labour under a misunderstanding of the original report. I apologize if I was not clear enough. Because RFC 2426 indicates that a VCard BDAY field may or may not include a time of day, to be standards-compliant libkadc should be able to read and write BDAY fields in either format. And because KAddressbook currently does not read from the user a time of day, neither should it select a time arbitrarily and then write it to the VCard file, which is what it is currently doing. Even if KAddressbook did prompt the user for a time of day for the birthday field, it should give the user the option of not selecting one, because in most cases the user will not know the contact's birthday down to the second. Your point about most desktop applications not reading the time anyway is taken, but consider that programmers like me may wish to import VCards into databases where birth time is significant (e.g., medical or astrological databases). The whole point of VCard is that it is a standardized information interchange format that can be easily processed by text tools such as Perl, so you can't really anticipate what use will be made of the data KAddressbook exports. If you're thinking about fixing this problem in the future then might I suggest that the resolution at least be changed from "INVALID" to "LATER"? Would something like this do the trick. QString KABC::dateToVCardString( const QDateTime &dateTime ) { if( dateTime.time().isNull() ) return dateTime.toString( "yyyyMMdd" ); // If time has not been set, simply record just the date else return dateTime.toString( "yyyyMMddThhmmssZ" ); } In svn trunk 863121 the BDAY still has the noon time :1978-07-20T00:00:00Z. Part of the problem is that QString VCardTool::createDateTime( const QDateTime &dateTime ) const at vcardtool.cpp is called with a valid Date and valid Time (00:00:00) to convert the QDateTime to Qstring (and write it to the vcf file). Therefore, to export only a Date, the Time should be invalid when calling this method. The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product. |