# HG changeset patch
# User laurent
# Date 1301671384 -7200
# Node ID 120bc22302a11bdef62866bf6c583b2ce95a316a
# Parent  726f58cf97e30c0518729b906be42227a6cc9a65
Bug in translation from timedelta to timespec fixed

diff -r 726f58cf97e3 -r 120bc22302a1 targets/typemapping.py
--- a/targets/typemapping.py	Fri Apr 01 16:17:38 2011 +0200
+++ b/targets/typemapping.py	Fri Apr 01 17:23:04 2011 +0200
@@ -62,7 +62,7 @@
     "LREAL" :      _t(c_double),
     "TIME" :       _t(IEC_TIME, 
                       lambda x:td(0, x.s, x.ns/1000), 
-                      lambda t,x:t(x.seconds, x.microseconds*1000)),
+                      lambda t,x:t(x.days * 24 * 3600 + x.seconds, x.microseconds*1000)),
     } 
 
 SwapedEndianessTypeTranslator = {