You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by ah...@apache.org on 2013/08/20 00:39:35 UTC

svn commit: r1515648 - /incubator/climate/branches/RefactorPlots/rcmet/src/main/python/rcmes/services/decode_model_times.py

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')