add 2 hours to datetime values in office documents to account for timezone shift
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@4024 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
5fcec9dad6
commit
7ab2d6abfd
1 changed files with 4 additions and 2 deletions
|
@ -22,7 +22,7 @@ Resource adapter(s) for MS Office files.
|
|||
$Id$
|
||||
"""
|
||||
|
||||
from datetime import date
|
||||
from datetime import date, datetime, timedelta
|
||||
from logging import getLogger
|
||||
from lxml import etree
|
||||
import os
|
||||
|
@ -127,5 +127,7 @@ class OfficeFile(ExternalFileAdapter):
|
|||
|
||||
|
||||
def parseDate(s):
|
||||
return date(*strptime(s, '%Y-%m-%dT%H:%M:%SZ')[:3])
|
||||
dt = datetime(*strptime(s, '%Y-%m-%dT%H:%M:%SZ')[:6]) + timedelta(hours=2)
|
||||
return date(dt.year, dt.month, dt.day)
|
||||
#return date(*strptime(s, '%Y-%m-%dT%H:%M:%SZ')[:3])
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue