[Liblas-commits] r1187 - trunk/python/tests

liblas-commits at liblas.org liblas-commits at liblas.org
Mon Apr 6 14:09:21 EDT 2009


Author: hobu
Date: Mon Apr  6 14:09:21 2009
New Revision: 1187
URL: http://liblas.org/changeset/1187

Log:
try to fix for timezones that might be different

Modified:
   trunk/python/tests/Point.txt

Modified: trunk/python/tests/Point.txt
==============================================================================
--- trunk/python/tests/Point.txt	(original)
+++ trunk/python/tests/Point.txt	Mon Apr  6 14:09:21 2009
@@ -60,7 +60,12 @@
   45
   
   >>> import datetime
-  >>> td = datetime.timedelta(hours=5) # my timezone is GMT-5
+  >>> import math
+  >>> def get_td():
+  ...     now = datetime.datetime.now()
+  ...     td = now.utcnow() - now
+  ...     return int(math.floor(td.seconds/3600.0))
+  >>> td = datetime.timedelta(hours=get_td()) # my timezone is GMT-5
   >>> t = datetime.datetime(2008,3,19,23,45,45,13434) - td
   >>> p.time = t
   >>> p.time


More information about the Liblas-commits mailing list