Here you can find the source of parseTimezoneOffset(String value)
private static long parseTimezoneOffset(String value) throws ParseException
//package com.java2s; import java.text.ParseException; public class Main { private static long parseTimezoneOffset(String value) throws ParseException { int pos = value.indexOf(':'); if (pos == -1) { throw new ParseException("Invalid offset value: " + value, 0); }/*from w w w . j a va 2 s.c om*/ String hours = value.substring(0, pos); String minutes = value.substring(pos + 1); return (Long.parseLong(hours) * 60 + Long.parseLong(minutes)) * 60; } }