Ticket #6860: negative_time_duration.patch

File negative_time_duration.patch, 663 bytes (added by anonymous, 10 years ago)
  • boost/date_time/time_facet.hpp

     
    801801        char_type c = '\0';
    802802        if((sitr != stream_end) && (*sitr == '-' || *sitr == '+')) {
    803803          c = *sitr;
     804          ++sitr;
    804805        }
    805806
    806807        typedef typename time_duration_type::hour_type hour_type;
     
    921922        }
    922923
    923924        td = time_duration_type(hour, min, sec, frac);
     925        if (c == '-')
     926          td = td.invert_sign();
    924927        return sitr;
    925928      }
    926929
     
    13641367
    13651368
    13661369#endif
    1367