diff options
author | John Wiegley <johnw@newartisans.com> | 2006-03-28 05:24:02 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:32 -0400 |
commit | 5a93d4819e5fc753352618b729e0fe45532166b9 (patch) | |
tree | 200220bfcc5642a9efd8847001aeac889ed79e7d /gnucash.cc | |
parent | c3c401ac0f43dfb3f71b818b45ef47578e6d390b (diff) | |
download | fork-ledger-5a93d4819e5fc753352618b729e0fe45532166b9.tar.gz fork-ledger-5a93d4819e5fc753352618b729e0fe45532166b9.tar.bz2 fork-ledger-5a93d4819e5fc753352618b729e0fe45532166b9.zip |
Reworked the way date/times are handled.
Diffstat (limited to 'gnucash.cc')
-rw-r--r-- | gnucash.cc | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -292,12 +292,9 @@ static void dataHandler(void *userData, const char *s, int len) curr_entry->code = std::string(s, len); break; - case ENTRY_DATE: { - struct tm when; - strptime(std::string(s, len).c_str(), "%Y-%m-%d %H:%M:%S %z", &when); - curr_entry->_date = std::mktime(&when); + case ENTRY_DATE: + curr_entry->_date = std::string(s, len); break; - } case ENTRY_DESC: curr_entry->payee = std::string(s, len); @@ -375,6 +372,10 @@ unsigned int gnucash_parser_t::parse(std::istream& in, { char buf[BUFSIZ]; + // This is the date format used by Gnucash, so override whatever the + // user specified. + date_t::input_format = "%Y-%m-%d %H:%M:%S %z"; + count = 0; action = NO_ACTION; curr_journal = journal; |