#include <CdbTimeUtils.hh>
Static Public Member Functions | |
| bool | string2time (BdbTime &theTime, const char *theString) |
| Translate a string into an object of BdbTime. | |
| bool | string2time (BdbTime &theTime, const std::string &theString) |
| Translate a string into an object of BdbTime. | |
| std::string | time2string (const BdbTime &theTime, bool forceInternalFormat=false, bool packedFormat=false) |
| Translate an object of BdbTime into a string. | |
| std::string | time2string2 (const BdbTime &theTime, BdbTime::Zone theTimeZone=BdbTime::Local, bool forceInternalFormat=false, bool packedFormat=false) |
| Translate an object of BdbTime into a string. | |
| std::string | get_current_timestamp () |
| Get the current timestamp. | |
| BdbTime | from_nsec (unsigned long long theNumber) |
| Translate a 64-bit number of nanoseconds into an object of BdbTime. | |
| unsigned long long | to_nsec (const BdbTime &theTime) |
| Translate an object of BdbTime class into a 64-bit number of nanoseconds. | |
This is a collection of most common operations with BdbTime done in in the context of CDB API, its implementations, and its clients.
Definition at line 18 of file CdbTimeUtils.hh.
|
|
Translate a 64-bit number of nanoseconds into an object of BdbTime. A number on the input is supposed to be a previously packed value of a BdbTime object. The overflow is returned as BdbTime::plusInfinity Definition at line 133 of file CdbTimeUtils.cc. References BdbTimeConst::nsecInASec, BdbTime::plusInfinity, and BdbTimeConst::plusInfinity. Referenced by CdbMySQLSelectQuery::checked_get(), and CdbMySQLSelectQuery::get(). |
|
|
Get the current timestamp. This utility function would produce a string with the current timestamp in the following format: monthDay_hour::minute::sec.milisec Definition at line 112 of file CdbTimeUtils.cc. |
|
||||||||||||
|
Translate a string into an object of BdbTime. A variation of the above explained method. Definition at line 60 of file CdbTimeUtils.cc. References string2time(). |
|
||||||||||||
|
Translate a string into an object of BdbTime. This utility method would attempt to translate the specified string into an object of the BdbTime class if this is possible. A non zero pointer onto a string is expected. NOTE; Unlike the standard method of translating time available through the current one will also recognize an internal numeric format of time. If the translation will be successfull then the resulting flag would be set to "true" and the reference would be properly initialized. Otherwise the reference would not be affected.
Definition at line 24 of file CdbTimeUtils.cc. References BdbTime::parseTime(). Referenced by main(), CdbBrowserTool::run(), and string2time(). |
|
||||||||||||||||
|
||||||||||||||||||||
|
Translate an object of BdbTime into a string. The method would return a string with an internal representation of time followed by its human readable string: 3123456789.0987654321 : Wed 15 Jan 2005 10:11:00 (local timezone) 0 ns
Definition at line 95 of file CdbTimeUtils.cc. References BdbTime::asString(), BdbTime::getGmtNsec(), and time2string(). Referenced by CdbMySQLCondition::create_revision(), and main(). |
|
|
Translate an object of BdbTime class into a 64-bit number of nanoseconds. A number on the input is supposed to be a previously packed value of a BdbTime object. Definition at line 146 of file CdbTimeUtils.cc. References BdbTime::getGmtNsec(), BdbTime::getGmtSec(), and BdbTimeConst::nsecInASec. Referenced by CdbMySQLOrigin::close_partition(), CdbMySQLOrigin::create_cluster(), CdbMySQLOrigin::create_condition(), CdbMySQLFolder::create_folder(), CdbMySQLOrigin::create_partition(), CdbMySQLCondition::create_revision(), CdbMySQL::create_slave_origin(), CdbMySQLOrigin::create_view(), CdbMySQLConditionAtFolder::find_config_element(), CdbMySQLOrigin::find_partition(), CdbMySQLCondition::find_revision(), CdbMySQLOrigin::find_topmost_partition(), CdbMySQLFolder::include_condition(), CdbMySQL::initialize_master_origin(), CdbMySQLOrigin::instantiate_partition(), CdbMySQLCondition::original_objects(), CdbMySQLConditionAtFolder::set_config(), CdbMySQLCondition::store_object(), CdbMySQL::synchronize_master(), CdbMySQLCondition::topmost_revision_id(), and CdbMySQLPartition::update(). |
1.3-rc3