|
From: <li...@us...> - 2008-12-17 10:47:32
|
Revision: 590
http://pyphant.svn.sourceforge.net/pyphant/?rev=590&view=rev
Author: liehr
Date: 2008-12-17 10:47:27 +0000 (Wed, 17 Dec 2008)
Log Message:
-----------
FMFLoader supports parsing of timestamps on basis of the mx.DateTime.ISO module.
All datetime strings, which are conform to ISO 8601,
are normalized to 'YYYY-MM-DD HH-MM-SS.ss'.
Modified Paths:
--------------
trunk/doc/demo/example.fmf
trunk/src/workers/fmfile/fmfile/FMFLoader.py
Modified: trunk/doc/demo/example.fmf
===================================================================
--- trunk/doc/demo/example.fmf 2008-12-17 10:46:43 UTC (rev 589)
+++ trunk/doc/demo/example.fmf 2008-12-17 10:47:27 UTC (rev 590)
@@ -75,6 +75,15 @@
estimated parameter: 1 \pm 0.1
another estimated parameter: 1 \pm 1%
list of quantities: 1V, 22 degC,(1 +- 1%) 2 ohm
+[Datetime stamps]
+date: 2008-12-16
+week date: 2008-W47-1
+list of dates: 2008-11-17,2008-1-3,2006-2-17,2008-W47-1
+datetime: 2008-12-16T16:51
+another datetime: 2008-12-16 16:51
+datetime with second: 2008-12-16T16:51:05
+datetime UTC: 2008-12-16T16:51Z
+datetime+2h: 2006-04-23 14:25:51+02:00
[*table definitions]
table: T
mixed: M
Modified: trunk/src/workers/fmfile/fmfile/FMFLoader.py
===================================================================
--- trunk/src/workers/fmfile/fmfile/FMFLoader.py 2008-12-17 10:46:43 UTC (rev 589)
+++ trunk/src/workers/fmfile/fmfile/FMFLoader.py 2008-12-17 10:47:27 UTC (rev 590)
@@ -41,6 +41,7 @@
from pyphant.core import (Worker, Connectors,
Param, DataContainer)
from pyphant.quantities.PhysicalQuantities import PhysicalQuantity,isPhysicalUnit,isPhysicalQuantity
+import mx.DateTime.ISO
import logging
_logger = logging.getLogger("pyphant")
@@ -281,6 +282,7 @@
float,
complex,
parseBool,
+ lambda d: str(mx.DateTime.ISO.ParseAny(d))
]
def str2unit(unit):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|