From 40373abd3960216c8f34dfcda7ed7f2adc2db99b Mon Sep 17 00:00:00 2001 From: BobHanson Date: Tue, 9 Jun 2020 01:25:37 -0500 Subject: [PATCH] JAL-3446 from applet - Cache news date fix - US time stored differently, I guess. --- src/jalview/bin/Cache.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index a89714a..69f5f63 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -1048,11 +1048,16 @@ public class Cache implements ApplicationSingletonI public static Date getDateProperty(String propertyName) { String val = getProperty(propertyName); + if (val != null) { try { - return date_format.parse(val); + if ((val = val.trim()).indexOf(",") < 0 && val.indexOf("-") >= 0 && val.indexOf(" ") == val.lastIndexOf(" ")) { + val = val.replace(" ",", ").replace('-',' '); + } + Date date = date_format.parse(val); + return date; } catch (Exception ex) { System.err.println("Invalid or corrupt date in property '" -- 1.7.10.2