File: 0003-fix-get_property_datetime-utc.patch

package info (click to toggle)
python-xmp-toolkit 2.0.1%2Bgit20140309.5437b0a-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,572 kB
  • ctags: 601
  • sloc: python: 2,889; makefile: 62; sh: 12
file content (24 lines) | stat: -rw-r--r-- 923 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 58dd24e59df6b9de32c7be2bed73c949ccb18b5d Mon Sep 17 00:00:00 2001
From: Daniel Stender <debian@danielstender.com>
Date: Sat, 20 Feb 2016 16:28:14 +0100
Subject: fix-get_property_datetime-utc

Description: fix wrong conversion from timezones into UTC with get_property_datetime()
Forwarded: https://github.com/python-xmp-toolkit/python-xmp-toolkit/issues/48
---
 libxmp/exempi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libxmp/exempi.py b/libxmp/exempi.py
index 5252841..338a056 100644
--- a/libxmp/exempi.py
+++ b/libxmp/exempi.py
@@ -769,7 +769,7 @@ def get_property_date(xmp, schema, name):
                                minutes=xmp_date_time.tzminute,
                                microseconds=xmp_date_time.nanosecond * 1000)
 
-    if xmp_date_time.tzsign < 0:
+    if xmp_date_time.tzsign > 0:
         the_date = utc_date - delta
     else:
         the_date = utc_date + delta