|
BOSS 8.0.0
BESIII Offline Software System
|
#include <Timestamp.h>
Public Member Functions | |
| Timestamp () | |
| Timestamp (long int seconds, int nano=0, int tzOffset=0) | |
| Timestamp (double julian) | |
| Constructor for Julian date. Must be GMT. | |
| Timestamp (const std::string &str, int tzOffset=0) | |
| Timestamp (int year, int month, int day, int hour=0, int minute=0, int second=0, int nano=0) | |
| Construct absolute time with specified fields. | |
| std::string | getString () const |
| Return string representation of time, not including nanoseconds;. | |
| double | getJulian () const |
| Return julian date. | |
| double | getNano () const |
| long int | getClibTime () const |
| bool | operator< (const Timestamp &other) const |
| bool | operator> (const Timestamp &other) const |
| bool | operator<= (const Timestamp &other) const |
| bool | operator>= (const Timestamp &other) const |
| Timestamp & | operator= (const Timestamp &other) |
| bool | operator== (const Timestamp &other) const |
| bool | operator!= (const Timestamp &other) const |
| Timestamp () | |
| Timestamp (long int seconds, int nano=0, int tzOffset=0) | |
| Timestamp (double julian) | |
| Constructor for Julian date. Must be GMT. | |
| Timestamp (const std::string &str, int tzOffset=0) | |
| Timestamp (int year, int month, int day, int hour=0, int minute=0, int second=0, int nano=0) | |
| Construct absolute time with specified fields. | |
| std::string | getString () const |
| Return string representation of time, not including nanoseconds;. | |
| double | getJulian () const |
| Return julian date. | |
| double | getNano () const |
| long int | getClibTime () const |
| bool | operator< (const Timestamp &other) const |
| bool | operator> (const Timestamp &other) const |
| bool | operator<= (const Timestamp &other) const |
| bool | operator>= (const Timestamp &other) const |
| Timestamp & | operator= (const Timestamp &other) |
| bool | operator== (const Timestamp &other) const |
| bool | operator!= (const Timestamp &other) const |
| Timestamp () | |
| Timestamp (long int seconds, int nano=0, int tzOffset=0) | |
| Timestamp (double julian) | |
| Constructor for Julian date. Must be GMT. | |
| Timestamp (const std::string &str, int tzOffset=0) | |
| Timestamp (int year, int month, int day, int hour=0, int minute=0, int second=0, int nano=0) | |
| Construct absolute time with specified fields. | |
| std::string | getString () const |
| Return string representation of time, not including nanoseconds;. | |
| double | getJulian () const |
| Return julian date. | |
| double | getNano () const |
| long int | getClibTime () const |
| bool | operator< (const Timestamp &other) const |
| bool | operator> (const Timestamp &other) const |
| bool | operator<= (const Timestamp &other) const |
| bool | operator>= (const Timestamp &other) const |
| Timestamp & | operator= (const Timestamp &other) |
| bool | operator== (const Timestamp &other) const |
| bool | operator!= (const Timestamp &other) const |
Protected Attributes | |
| time_t | m_time |
| internal binary rep of time; count seconds from Jan 1, 1970 | |
| int | m_nano |
| Save fractional seconds separately (associated with m_time). | |
Timestamp class, valid for dates from 1970 through 2037
Supports comparisons
Input to constructors may be Julian date seconds since start of 1970, Jan. 1 with optional nanosecond field individual fields (year, month, etc.) string format
yyyy-mm-dd hh:mm:ss 1969 < yyyy < 2038 where 0 < mm < 13 0 < dd < 32 -1 < hh < 24 -1 < mm < 60 -1 < ss < 60
o only the first three fields are required. Omitted trailing fields will be interpreted as equal to 0. o by default : will be used to delimit fields, but user may specify an alternative in most circumstances o leading zeros are optional
Definition at line 49 of file Calibration/facilities/include/facilities/Timestamp.h.
| facilities::Timestamp::Timestamp | ( | ) |
Default constructor builds object representing current time, expressed in GMT
Definition at line 20 of file Timestamp.cxx.
Referenced by operator!=(), operator<(), operator<=(), operator=(), operator==(), operator>(), and operator>=().
| facilities::Timestamp::Timestamp | ( | long int | seconds, |
| int | nano = 0, | ||
| int | tzOffset = 0 ) |
Count seconds from the creation-according-to-unix, start of 1970 Optional third argument is offset in seconds from GMT (e.g., PST is +28800)
Definition at line 27 of file Timestamp.cxx.
| facilities::Timestamp::Timestamp | ( | double | julian | ) |
Constructor for Julian date. Must be GMT.
Definition at line 35 of file Timestamp.cxx.
| facilities::Timestamp::Timestamp | ( | const std::string & | str, |
| int | tzOffset = 0 ) |
Create a timestamp from an ascii string of standard form yyyy-mm-dd hh:mm:ss where only the first three fields are required.
If the string is invalid, object will represent unix creation time. If the string represents a time in a timezone other than GMT, tzOffset should represent time zone offset relative to GMT in seconds so if local time is, for example, PST, tzOffset should be 28800
Definition at line 51 of file Timestamp.cxx.
| facilities::Timestamp::Timestamp | ( | int | year, |
| int | month, | ||
| int | day, | ||
| int | hour = 0, | ||
| int | minute = 0, | ||
| int | second = 0, | ||
| int | nano = 0 ) |
Construct absolute time with specified fields.
Definition at line 57 of file Timestamp.cxx.
| facilities::Timestamp::Timestamp | ( | ) |
Default constructor builds object representing current time, expressed in GMT
| facilities::Timestamp::Timestamp | ( | long int | seconds, |
| int | nano = 0, | ||
| int | tzOffset = 0 ) |
Count seconds from the creation-according-to-unix, start of 1970 Optional third argument is offset in seconds from GMT (e.g., PST is +28800)
| facilities::Timestamp::Timestamp | ( | double | julian | ) |
Constructor for Julian date. Must be GMT.
| facilities::Timestamp::Timestamp | ( | const std::string & | str, |
| int | tzOffset = 0 ) |
Create a timestamp from an ascii string of standard form yyyy-mm-dd hh:mm:ss where only the first three fields are required.
If the string is invalid, object will represent unix creation time. If the string represents a time in a timezone other than GMT, tzOffset should represent time zone offset relative to GMT in seconds so if local time is, for example, PST, tzOffset should be 28800
| facilities::Timestamp::Timestamp | ( | int | year, |
| int | month, | ||
| int | day, | ||
| int | hour = 0, | ||
| int | minute = 0, | ||
| int | second = 0, | ||
| int | nano = 0 ) |
Construct absolute time with specified fields.
| facilities::Timestamp::Timestamp | ( | ) |
Default constructor builds object representing current time, expressed in GMT
| facilities::Timestamp::Timestamp | ( | long int | seconds, |
| int | nano = 0, | ||
| int | tzOffset = 0 ) |
Count seconds from the creation-according-to-unix, start of 1970 Optional third argument is offset in seconds from GMT (e.g., PST is +28800)
| facilities::Timestamp::Timestamp | ( | double | julian | ) |
Constructor for Julian date. Must be GMT.
| facilities::Timestamp::Timestamp | ( | const std::string & | str, |
| int | tzOffset = 0 ) |
Create a timestamp from an ascii string of standard form yyyy-mm-dd hh:mm:ss where only the first three fields are required.
If the string is invalid, object will represent unix creation time. If the string represents a time in a timezone other than GMT, tzOffset should represent time zone offset relative to GMT in seconds so if local time is, for example, PST, tzOffset should be 28800
| facilities::Timestamp::Timestamp | ( | int | year, |
| int | month, | ||
| int | day, | ||
| int | hour = 0, | ||
| int | minute = 0, | ||
| int | second = 0, | ||
| int | nano = 0 ) |
Construct absolute time with specified fields.
|
inline |
Definition at line 86 of file Calibration/facilities/include/facilities/Timestamp.h.
Referenced by Coverage::Coverage(), and SelectInfo::SelectInfo().
|
inline |
Definition at line 86 of file InstallArea/x86_64-el9-gcc13-dbg/include/facilities/Timestamp.h.
|
inline |
Definition at line 86 of file InstallArea/x86_64-el9-gcc13-opt/include/facilities/Timestamp.h.
| double facilities::Timestamp::getJulian | ( | ) | const |
Return julian date.
Definition at line 94 of file Timestamp.cxx.
| double facilities::Timestamp::getJulian | ( | ) | const |
Return julian date.
| double facilities::Timestamp::getJulian | ( | ) | const |
Return julian date.
|
inline |
Definition at line 85 of file Calibration/facilities/include/facilities/Timestamp.h.
|
inline |
Definition at line 85 of file InstallArea/x86_64-el9-gcc13-dbg/include/facilities/Timestamp.h.
|
inline |
Definition at line 85 of file InstallArea/x86_64-el9-gcc13-opt/include/facilities/Timestamp.h.
| std::string facilities::Timestamp::getString | ( | ) | const |
Return string representation of time, not including nanoseconds;.
Definition at line 87 of file Timestamp.cxx.
Referenced by rdbModel::Column::interpret(), lookup(), main(), operator<<(), calibUtil::Metadata::registerCalib(), and soonest().
| std::string facilities::Timestamp::getString | ( | ) | const |
Return string representation of time, not including nanoseconds;.
| std::string facilities::Timestamp::getString | ( | ) | const |
Return string representation of time, not including nanoseconds;.
|
inline |
Definition at line 109 of file Calibration/facilities/include/facilities/Timestamp.h.
|
inline |
Definition at line 109 of file InstallArea/x86_64-el9-gcc13-dbg/include/facilities/Timestamp.h.
|
inline |
Definition at line 109 of file InstallArea/x86_64-el9-gcc13-opt/include/facilities/Timestamp.h.
|
inline |
Definition at line 88 of file Calibration/facilities/include/facilities/Timestamp.h.
|
inline |
|
inline |
|
inline |
Definition at line 95 of file Calibration/facilities/include/facilities/Timestamp.h.
|
inline |
Definition at line 95 of file InstallArea/x86_64-el9-gcc13-dbg/include/facilities/Timestamp.h.
|
inline |
Definition at line 95 of file InstallArea/x86_64-el9-gcc13-opt/include/facilities/Timestamp.h.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 93 of file Calibration/facilities/include/facilities/Timestamp.h.
|
inline |
Definition at line 93 of file InstallArea/x86_64-el9-gcc13-dbg/include/facilities/Timestamp.h.
|
inline |
Definition at line 93 of file InstallArea/x86_64-el9-gcc13-opt/include/facilities/Timestamp.h.
|
inline |
Definition at line 97 of file Calibration/facilities/include/facilities/Timestamp.h.
|
inline |
Definition at line 97 of file InstallArea/x86_64-el9-gcc13-dbg/include/facilities/Timestamp.h.
|
inline |
Definition at line 97 of file InstallArea/x86_64-el9-gcc13-opt/include/facilities/Timestamp.h.
|
protected |
Save fractional seconds separately (associated with m_time).
Definition at line 145 of file Calibration/facilities/include/facilities/Timestamp.h.
Referenced by getJulian(), getNano(), operator<(), operator=(), operator==(), Timestamp(), Timestamp(), Timestamp(), Timestamp(), and Timestamp().
|
protected |
internal binary rep of time; count seconds from Jan 1, 1970
Definition at line 142 of file Calibration/facilities/include/facilities/Timestamp.h.
Referenced by getClibTime(), getJulian(), getString(), operator<(), operator=(), operator==(), Timestamp(), Timestamp(), Timestamp(), Timestamp(), and Timestamp().