You could parse a jira style time string into seconds using Joda time using something like this:
import org.joda.time.format.*;
import org.joda.time.;
import java.util.;
public class JiraStyleTimeParser
{
public static void main(String[] args)
{
String example = "1h 1m 30s";
MutablePeriod parsedPeriod = new MutablePeriod();
PeriodFormatter formatter = new PeriodFormatterBuilder()
.appendDays().appendSuffix("d")
.appendSeparator(" ")
.appendHours().appendSuffix("h")
.appendSeparator(" ")
.appendMinutes().appendSuffix("m")
.appendSeparator(" ")
.appendSeconds().appendSuffix("s")
.printZeroAlways()
.toFormatter();
PeriodParser parser = new PeriodFormatterBuilder()
.appendDays().appendSuffix("d")
.appendSeparator(" ")
.appendHours().appendSuffix("h")
.appendSeparator(" ")
.appendMinutes().appendSuffix("m")
.appendSeparator(" ")
.appendSeconds().appendSuffix("s")
.printZeroAlways()
.toParser();
int working = parser.parseInto(parsedPeriod, example,0, new Locale("en"));
System.out.println(formatter.print(parsedPeriod));
Duration theduration = parsedPeriod.toPeriod().toStandardDuration();
System.out.println("period in seconds: " + theduration.getStandardSeconds());
}
}