~ubuntu-branches/ubuntu/wily/dnsjava/wily-proposed

« back to all changes in this revision

Viewing changes to org/xbill/DNS/FormattedTime.java

  • Committer: Bazaar Package Importer
  • Author(s): Chris Grzegorczyk, moeller at d
  • Date: 2009-12-17 01:08:10 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091217010810-he589osm73wkrvi4
Tags: 2.0.8-1
* Port package to pkg-java based largely on existing Ubuntu package.
[ by sponsor moeller@d.o ]
* New upstream version (Closes: #562199).
* Disabled checks because of issue with byteArrayToString().

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
 */
56
56
public static Date
57
57
parse(String s) throws TextParseException {
58
 
        Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
59
 
 
60
58
        if (s.length() != 14) {
61
59
                throw new TextParseException("Invalid time encoding: " + s);
62
60
        }
 
61
 
 
62
        Calendar c = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
 
63
        c.clear();
63
64
        try {
64
65
                int year = Integer.parseInt(s.substring(0, 4));
65
66
                int month = Integer.parseInt(s.substring(4, 6)) - 1;