#ifndef SOFIE_DATABASE_ADJUST_2007_04_03 #define SOFIE_DATABASE_ADJUST_2007_04_03 /** @file SofieDBAdjust.h @author Brian Magill @creation date 4/03/2007 @brief Class for reading Level 0 Science data */ //---------------------------------------------------------------------- // #include #include #include #include "GATS_DB_Exception.h" #include "GATS_DB.h" class SofieDBAdjust { private: gatsDBpp::GATS_DB *dbConn; public: SofieDBAdjust(gatsDBpp::GATS_DB &conn):dbConn(&conn) { } SofieDBAdjust(SofieDBAdjust const& rhs ):dbConn(rhs.dbConn) { } SofieDBAdjust& operator = (SofieDBAdjust const& rhs ) { if(&rhs == this) return *this; dbConn = rhs.dbConn; return *this; } ~SofieDBAdjust(){ } void UseGMTimeZone() { std::string strErr; std::string sqlString = "SET TIME_ZONE= '+0:00'"; try { dbConn->Query(sqlString.c_str()); } catch (std::exception &ex) { strErr = "SofieDBAdjust::UseGMTimeZone() Problem changing time zone."; throw std::runtime_error(strErr); } } }; #endif