update string format
This commit is contained in:
parent
8bba5382ed
commit
3b7827ec0a
2 changed files with 4 additions and 5 deletions
|
|
@ -94,8 +94,8 @@ set( sources
|
||||||
|
|
||||||
setup_library( fc SOURCES ${sources} )
|
setup_library( fc SOURCES ${sources} )
|
||||||
|
|
||||||
setup_executable( json_rpc_test SOURCES tests/json_rpc_test.cpp LIBRARIES fc ${pthread_library} ${rt_library} ${Boost_THREAD_LIBRARY} ${Boost_CONTEXT_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_CHRONO_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${rt_library} )
|
setup_executable( json_rpc_test SOURCES tests/json_rpc_test.cpp LIBRARIES fc ${pthread_library} ${rt_library} ${Boost_THREAD_LIBRARY} ${Boost_CONTEXT_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_CHRONO_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${rt_library} ${Boost_DATE_TIME_LIBRARY})
|
||||||
setup_executable( ssh_test SOURCES tests/ssh.cpp LIBRARIES fc ${pthread_library} ${rt_library} ${Boost_THREAD_LIBRARY} ${Boost_CONTEXT_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_CHRONO_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${rt_library} ssh2 ${OPENSSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} z)
|
setup_executable( ssh_test SOURCES tests/ssh.cpp LIBRARIES fc ${pthread_library} ${rt_library} ${Boost_THREAD_LIBRARY} ${Boost_CONTEXT_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_CHRONO_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${rt_library} ssh2 ${OPENSSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} z ${Boost_DATE_TIME_LIBRARY})
|
||||||
|
|
||||||
#add_executable( test_vec tests/vector_test.cpp )
|
#add_executable( test_vec tests/vector_test.cpp )
|
||||||
#target_link_libraries( test_vec fc ${Boost_SYSTEM_LIBRARY} ${Boost_CHRONO_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_CONTEXT_LIBRARY} )
|
#target_link_libraries( test_vec fc ${Boost_SYSTEM_LIBRARY} ${Boost_CHRONO_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_CONTEXT_LIBRARY} )
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include <boost/chrono/system_clocks.hpp>
|
#include <boost/chrono/system_clocks.hpp>
|
||||||
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <fc/time.hpp>
|
#include <fc/time.hpp>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
@ -11,8 +12,6 @@ namespace fc {
|
||||||
bch::system_clock::time_point tp;
|
bch::system_clock::time_point tp;
|
||||||
tp += bch::microseconds( elapsed._count);
|
tp += bch::microseconds( elapsed._count);
|
||||||
time_t tt = bch::system_clock::to_time_t(tp);
|
time_t tt = bch::system_clock::to_time_t(tp);
|
||||||
std::stringstream ss;
|
return boost::posix_time::to_iso_string( boost::posix_time::from_time_t(tt) );
|
||||||
ss<<tt;
|
|
||||||
return ss.str();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue