Commits

Sergey A. Bozhenkov  committed e0c9e94

Add a quick workaround for UTC in date and datetime. Need a proper timezone handling

  • Participants
  • Parent commits 9d2c3b9

Comments (0)

Files changed (1)

File osa/xmltypes.py

         if not(element.text):
             return None
         text = element.text
-
+        pos = text.find("UTC")
+        if pos != -1:
+            text = text[:pos]
         full = datetime.strptime(text, '%Y-%m-%d')
 
         return full.date()
         if not(element.text):
             return None
         text = element.text
+        pos = text.find("UTC")
+        if pos != -1:
+            text = text[:pos]
         return datetime.strptime(text, '%Y-%m-%dT%H:%M:%S.%f')