summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Sapp <nixphoeni@gentoo.org>2009-12-20 19:26:36 +0000
committerJoe Sapp <nixphoeni@gentoo.org>2009-12-20 19:26:36 +0000
commit4c7ff68545aca4905bf2baafc17f1666e92dd6c9 (patch)
tree33d6b7fdce2801687cdb8ee2f2dc436a7d6ea49a /dev-python/icalendar
parentversion bump for thunderbird-3, cleanup of old builds. (diff)
downloadgentoo-2-4c7ff68545aca4905bf2baafc17f1666e92dd6c9.tar.gz
gentoo-2-4c7ff68545aca4905bf2baafc17f1666e92dd6c9.tar.bz2
gentoo-2-4c7ff68545aca4905bf2baafc17f1666e92dd6c9.zip
Added pending patch to fix an issue in the vDatetime.ical() function
(Portage version: 2.1.7.14/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/icalendar')
-rw-r--r--dev-python/icalendar/ChangeLog9
-rw-r--r--dev-python/icalendar/files/icalendar-2.1-vDatetime-tzinfo-fix.patch30
-rw-r--r--dev-python/icalendar/icalendar-2.1-r1.ebuild (renamed from dev-python/icalendar/icalendar-2.1.ebuild)3
3 files changed, 40 insertions, 2 deletions
diff --git a/dev-python/icalendar/ChangeLog b/dev-python/icalendar/ChangeLog
index 07a35bc708e1..1cce65217940 100644
--- a/dev-python/icalendar/ChangeLog
+++ b/dev-python/icalendar/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-python/icalendar
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/ChangeLog,v 1.3 2009/12/19 22:17:22 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/ChangeLog,v 1.4 2009/12/20 19:26:35 nixphoeni Exp $
+
+*icalendar-2.1-r1 (20 Dec 2009)
+
+ 20 Dec 2009; Joe Sapp <nixphoeni@gentoo.org> -icalendar-2.1.ebuild,
+ +icalendar-2.1-r1.ebuild, +files/icalendar-2.1-vDatetime-tzinfo-fix.patch:
+ Added pending vDatetime.ical() patch from
+ http://codespeak.net/pipermail/icalendar-dev/2009-July/000139.html
*icalendar-2.1 (19 Dec 2009)
diff --git a/dev-python/icalendar/files/icalendar-2.1-vDatetime-tzinfo-fix.patch b/dev-python/icalendar/files/icalendar-2.1-vDatetime-tzinfo-fix.patch
new file mode 100644
index 000000000000..7f06b4f68c9e
--- /dev/null
+++ b/dev-python/icalendar/files/icalendar-2.1-vDatetime-tzinfo-fix.patch
@@ -0,0 +1,30 @@
+From http://codespeak.net/pipermail/icalendar-dev/2009-July/000139.html:
+
+SUMMARY: The encoding mechanism of vDatetime handles tzinfo fields
+incorrectly (specifically with respect to daylight savings time).
+Attached is a simple patch that makes it work.
+
+DETAILS: Currently vDatetime.ical() tries to compute the utcoffset of
+the tzinfo, and then subtract that offset. This approach is valid,
+but the computation of the utcoffset is wrong, because it's done relative
+to datetime.now() instead of the actual datetime object (self.dt)
+to be converted. This is an issue for timezones whose utcoffset varies
+throughout the year, e.g., from daylight savings time.
+Replacing datetime.now() with self.dt would fix the code,
+but I opted to use the builtin 'asttimezone' method
+because it's slightly simpler.
+
+Submitted by Erik Demaine.
+===================================================================
+--- src/icalendar/prop.py.orig 2009-12-14 08:43:50.000000000 -0500
++++ src/icalendar/prop.py 2009-12-20 12:41:28.000000000 -0500
+@@ -309,8 +309,7 @@
+
+ def ical(self):
+ if self.dt.tzinfo:
+- utc_time = self.dt - self.dt.tzinfo.utcoffset(datetime.now())
+- return utc_time.strftime("%Y%m%dT%H%M%SZ")
++ return self.dt.astimezone (UTC).strftime("%Y%m%dT%H%M%SZ")
+ return self.dt.strftime("%Y%m%dT%H%M%S")
+
+ def from_ical(ical):
diff --git a/dev-python/icalendar/icalendar-2.1.ebuild b/dev-python/icalendar/icalendar-2.1-r1.ebuild
index 7a33d0411172..acde89e2579c 100644
--- a/dev-python/icalendar/icalendar-2.1.ebuild
+++ b/dev-python/icalendar/icalendar-2.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/icalendar-2.1.ebuild,v 1.1 2009/12/19 22:17:22 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/icalendar/icalendar-2.1-r1.ebuild,v 1.1 2009/12/20 19:26:35 nixphoeni Exp $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
@@ -24,6 +24,7 @@ DOCS="CHANGES.txt CREDITS.txt doc/* HISTORY.txt README.txt TODO.txt"
src_prepare() {
epatch "${FILESDIR}/${PN}-2.0.1-UIDGenerator-fix.patch"
+ epatch "${FILESDIR}/${P}-vDatetime-tzinfo-fix.patch"
}
src_test() {