mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge branch 'release_15.10' into release_16.01
Conflicts: lib/galaxy/util/__init__.py
This commit is contained in:
@@ -361,7 +361,11 @@ def pretty_print_time_interval( time=False, precise=False ):
|
||||
elif isinstance( time, datetime ):
|
||||
diff = now - time
|
||||
elif isinstance( time, string_types ):
|
||||
time = datetime.strptime( time, "%Y-%m-%dT%H:%M:%S.%f" )
|
||||
try:
|
||||
time = datetime.strptime( time, "%Y-%m-%dT%H:%M:%S.%f" )
|
||||
except ValueError:
|
||||
# MySQL may not support microseconds precision
|
||||
time = datetime.strptime( time, "%Y-%m-%dT%H:%M:%S" )
|
||||
diff = now - time
|
||||
else:
|
||||
diff = now - now
|
||||
|
||||
Reference in New Issue
Block a user