// sets the current date/time (time(NULL)) and provided TimeZone as described in constructor
- void initialize(const char *TZ = NULL) throw();
+ void initialize(const char *TZ = NULL) ;
// main refresh method regarding timestamp
- void refresh(void) throw();
+ void refresh(void) ;
anna::Mutex a_mutex;
/**
* Sets the current date/time (time(NULL)) and provided TimeZone as described in constructor
*/
- void setNow(const char *TZ = NULL) throw() { initialize(TZ); }
+ void setNow(const char *TZ = NULL) { initialize(TZ); }
/**
* timezone, only helps to know the valid TZ values and shows how to change
* the timezone settings if you would want to do that).
*/
- void setTz(const char *TZ = NULL) throw();
+ void setTz(const char *TZ = NULL) ;
/**
Sets the local host timezone (even if it is based on TZ or in /usr/share/zoneinfo)
*/
- void setSystemTimezone() throw();
+ void setSystemTimezone() ;
/**
*
* @param unixTimestamp Time since 01-Jan-1970 GMT
*/
- void store(const time_t & unixTimestamp) throw();
- void storeUnix(const time_t & unixTimestamp) throw() { store(unixTimestamp); }
+ void store(const time_t & unixTimestamp) ;
+ void storeUnix(const time_t & unixTimestamp) { store(unixTimestamp); }
/**
*
* @param ntpTimestamp Time since 01-Jan-1900 GMT
*/
- void storeNtp(const unsigned int &ntpTimestamp) throw();
+ void storeNtp(const unsigned int &ntpTimestamp) ;
/**
* @param TZ timezone for date/time provided. Default (NULL) assumes the system
* timezone configuration. Empty string will be interpreted as UTC timezone.
*/
- void store(const struct tm &date, const char *TZ = NULL) throw(anna::RuntimeException);
+ void store(const struct tm &date, const char *TZ = NULL) noexcept(false);
/**
* @param strptimeFormat Date/time string format for strptime primitive.
* See format syntax at http://man7.org/linux/man-pages/man3/strptime.3.html
*/
- void store(const std::string &stringDate, const char *TZ = NULL, const char *strptimeFormat = "%Y%m%d%H%M%S") throw(anna::RuntimeException);
- //void store(const std::string &stringDate, const char *tz = NULL, const char *strptimeFormat = "%Y-%m-%d-%H-%M-%S") throw(anna::RuntimeException);
+ void store(const std::string &stringDate, const char *TZ = NULL, const char *strptimeFormat = "%Y%m%d%H%M%S") noexcept(false);
+ //void store(const std::string &stringDate, const char *tz = NULL, const char *strptimeFormat = "%Y-%m-%d-%H-%M-%S") noexcept(false);
/**
* @return NULL if TZ is unset, or string for TZ environment variable
* (empty is allowed and use to be understood as UTC.
*/
- const char *getTz(void) const throw() { return (a_tz.unsetTZ() ? NULL:a_tz.getValue().c_str()); }
+ const char *getTz(void) const { return (a_tz.unsetTZ() ? NULL:a_tz.getValue().c_str()); }
/**
* Gets the context timezone as string
*/
- std::string getTzAsString() const throw() { return a_tz.asString(); }
+ std::string getTzAsString() const { return a_tz.asString(); }
/**
*
* @return 'tm' struct on the current timezone
*/
- const struct tm & getTm(void) const throw() { return a_tm; }
+ const struct tm & getTm(void) const { return a_tm; }
/**
* Gets the week day abbreviation: Sun, Mon, Tue, Wed, Thu, Fri, Sat
*
* @return Day of the week
*/
- const char *getDay(void) const throw();
+ const char *getDay(void) const ;
/**
*
* @see getTz
*/
- std::string yyyymmddHHmmss(void) const throw();
+ std::string yyyymmddHHmmss(void) const ;
/**
*
* @return Seconds since 01-Jan-1970 GMT
*/
- const time_t & getUnixTimestamp(void) const throw() { return a_timestamp; }
+ const time_t & getUnixTimestamp(void) const { return a_timestamp; }
/**
*
* @return Seconds since 01-Jan-1900 GMT
*/
- unsigned int getNtpTimestamp(void) const throw() {
+ unsigned int getNtpTimestamp(void) const {
unsigned int ntp_timestamp = a_timestamp + TIMESTAMP_OFFSET_NTP1900_OVER_UNIX1970;
return ntp_timestamp;
}
*
* @return String with class content
*/
- std::string asString(void) const throw();
+ std::string asString(void) const ;
/**
*
* @return XML with class content
*/
- anna::xml::Node* asXML(anna::xml::Node* parent) const throw();
+ anna::xml::Node* asXML(anna::xml::Node* parent) const ;
};