--- YodaProfiler/src/GLTables.cpp 2006/09/06 11:04:39 1.5 +++ YodaProfiler/src/GLTables.cpp 2006/09/06 12:47:18 1.6 @@ -1098,3 +1098,51 @@ // return(rtime); } + +/* + * + * Convert the time in the DB from UInt_t to a string + * + * @param dbt time in the DB + * @param tzone Time Zone, can be UTC,GMT,CET,CEST,MSD default is MSK + * + */ +TString GL_TIMESYNC::UnConvertTime(TString tzone, UInt_t dbt){ + // + TDatime *time = new TDatime(); + TString rtime; + // + time->Set(dbt,false); // MSK = Moscow Winter Time + // + if ( !strcmp(tzone.Data(),"UTC") || !strcmp(tzone.Data(),"GMT") ){ + // + UInt_t timeUTC = time->Convert() + 60*60*3; // UTC (Coordinated Universal Time) +3 hs = Moscow Winter Time + time->Set(timeUTC,false); + // + }; + // + if ( !strcmp(tzone.Data(),"CET") ){ + // + UInt_t timeCET = time->Convert() + 60*60*2; // CET (Central European Time) + 2 hs = Moscow Winter Time + time->Set(timeCET,false); + // + }; + // + if ( !strcmp(tzone.Data(),"CEST") ){ + // + UInt_t timeCEST = time->Convert() + 60*60*1; // CEST (Central European Summer Time) + 1 h = Moscow Winter Time + time->Set(timeCEST,false); + // + }; + // + if ( !strcmp(tzone.Data(),"MSD") ){ + // + UInt_t timeMSD = time->Convert() - 60*60*1; // MSD (Moscow Summer Time) - 1 h = Moscow Winter Time + time->Set(timeMSD,false); + // + }; + // + rtime = time->AsSQLString(); + // + return(rtime); +}