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 /config.cc | |
parent | c3c401ac0f43dfb3f71b818b45ef47578e6d390b (diff) | |
download | ledger-5a93d4819e5fc753352618b729e0fe45532166b9.tar.gz ledger-5a93d4819e5fc753352618b729e0fe45532166b9.tar.bz2 ledger-5a93d4819e5fc753352618b729e0fe45532166b9.zip |
Reworked the way date/times are handled.
Diffstat (limited to 'config.cc')
-rw-r--r-- | config.cc | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -7,7 +7,6 @@ #include "walk.h" #include <fstream> -#include <ctime> #include <cstdlib> #ifdef WIN32 #include <io.h> @@ -96,12 +95,14 @@ config_t::config_t() prices_format = "%[%Y/%m/%d %H:%M:%S %Z] %-10A %12t %12T\n"; pricesdb_format = "P %[%Y/%m/%d %H:%M:%S] %A %t\n"; - download_quotes = false; - use_cache = false; - cache_dirty = false; - debug_mode = false; - verbose_mode = false; - trace_mode = false; + pricing_leeway = 24 * 3600; + + download_quotes = false; + use_cache = false; + cache_dirty = false; + debug_mode = false; + verbose_mode = false; + trace_mode = false; } ////////////////////////////////////////////////////////////////////// @@ -109,9 +110,7 @@ config_t::config_t() void trace(const std::string& cat, const std::string& str) { char buf[32]; - std::time_t now = std::time(NULL); - std::strftime(buf, 31, "%H:%M:%S", std::localtime(&now)); - + std::strftime(buf, 31, "%H:%M:%S", datetime_t::now.localtime()); std::cerr << buf << " " << cat << ": " << str << std::endl; } |