climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ah...@apache.org
Subject svn commit: r1515648 - /incubator/climate/branches/RefactorPlots/rcmet/src/main/python/rcmes/services/decode_model_times.py
Date Mon, 19 Aug 2013 22:39:35 GMT
Author: ahart
Date: Mon Aug 19 22:39:34 2013
New Revision: 1515648

URL: http://svn.apache.org/r1515648
Log:
propagate resolution of CLIMATE-260 to RefactorPlots branch

Modified:
    incubator/climate/branches/RefactorPlots/rcmet/src/main/python/rcmes/services/decode_model_times.py

Modified: incubator/climate/branches/RefactorPlots/rcmet/src/main/python/rcmes/services/decode_model_times.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorPlots/rcmet/src/main/python/rcmes/services/decode_model_times.py?rev=1515648&r1=1515647&r2=1515648&view=diff
==============================================================================
--- incubator/climate/branches/RefactorPlots/rcmet/src/main/python/rcmes/services/decode_model_times.py
(original)
+++ incubator/climate/branches/RefactorPlots/rcmet/src/main/python/rcmes/services/decode_model_times.py
Mon Aug 19 22:39:34 2013
@@ -28,6 +28,9 @@ def decodeTimeFromString(time_string):
     '''
     import time
     import datetime
+    
+    # If present, drop the ".0" from the end of the time string before testing
+    time_string = time_string.split('.')[0] + '0' if "." in time_string else time_string
 
     try:
         mytime = time.strptime(time_string, '%Y-%m-%d %H:%M:%S')



Mime
View raw message