• Vadim Zeitlin's avatar
    Avoid duplicate code for parsing dates in different backends · a1e07e38
    Vadim Zeitlin authored
    SQLite, MySQL and PostgreSQL backends used the same but slightly
    different code for parsing the contents of a buffer into std::tm struct.
    
    Replace all these different versions with a single version, copied from
    the PostgreSQL variant, which seems like the most complete, in the
    common code.
    
    Update MySQL-specific test to not expect parsing a string containing
    time without date to yield year 2000, this didn't make any sense at all
    and PostgreSQL default of year 1900 makes at least slightly more sense.
    a1e07e38
soci-mktime.h 1.21 KB