diff --git a/lib/ood_core/job/adapters/fujitsu_tcs.rb b/lib/ood_core/job/adapters/fujitsu_tcs.rb index aea28aa1e..eeccfb915 100644 --- a/lib/ood_core/job/adapters/fujitsu_tcs.rb +++ b/lib/ood_core/job/adapters/fujitsu_tcs.rb @@ -386,9 +386,8 @@ def directive_prefix # Convert duration to seconds def duration_in_seconds(time) return 0 if time.nil? or time == "-" - time, days = time.split("-").reverse - days.to_i * 24 * 3600 + - time.split(':').map { |v| v.to_i }.inject(0) { |total, v| total * 60 + v } + matched = time.match(/\((\d+\))/) + return matched ? matched[1].to_i : 0 end # Convert seconds to duration