Ignore:
Timestamp:
2016-02-06T22:04:49+01:00 (8 years ago)
Author:
Don-vip
Message:

fix #12497 - add support for notes in session files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java

    r9739 r9746  
    8080     */
    8181    public static synchronized long tsFromString(String str) throws UncheckedParseException {
    82         // "2007-07-25T09:26:24{Z|{+|-}01:00}"
     82        // "2007-07-25T09:26:24{Z|{+|-}01[:00]}"
    8383        if (checkLayout(str, "xxxx-xx-xxTxx:xx:xxZ") ||
    8484                checkLayout(str, "xxxx-xx-xxTxx:xx:xx") ||
    8585                checkLayout(str, "xxxx:xx:xx xx:xx:xx") ||
    8686                checkLayout(str, "xxxx-xx-xx xx:xx:xx UTC") ||
     87                checkLayout(str, "xxxx-xx-xxTxx:xx:xx+xx") ||
     88                checkLayout(str, "xxxx-xx-xxTxx:xx:xx-xx") ||
    8789                checkLayout(str, "xxxx-xx-xxTxx:xx:xx+xx:00") ||
    8890                checkLayout(str, "xxxx-xx-xxTxx:xx:xx-xx:00")) {
     
    9799            c.set(Calendar.MILLISECOND, 0);
    98100
    99             if (str.length() == 25) {
     101            if (str.length() == 22 || str.length() == 25) {
    100102                int plusHr = parsePart2(str, 20);
    101103                int mul = str.charAt(19) == '+' ? -3600000 : 3600000;
Note: See TracChangeset for help on using the changeset viewer.