--- YodaProfiler/src/GLTables.cpp 2006/09/08 14:42:48 1.9 +++ YodaProfiler/src/GLTables.cpp 2006/09/19 09:18:46 1.10 @@ -1114,10 +1114,11 @@ * @param tzone Time Zone, can be UTC,GMT,CET,CEST,MSD default is MSK * */ -TString GL_TIMESYNC::ConvertTime(TString tzone, UInt_t dbt){ +TString GL_TIMESYNC::ConvertTime(TString &tzone, UInt_t dbt){ // TDatime *time = new TDatime(); TString rtime; + Bool_t found = false; // time->Set(dbt,false); // MSK = Moscow Winter Time // @@ -1125,6 +1126,7 @@ // UInt_t timeUTC = time->Convert() - 60*60*3; // UTC (Coordinated Universal Time) = Moscow Winter Time - 3 hs time->Set(timeUTC,false); + found = true; // }; // @@ -1132,6 +1134,7 @@ // UInt_t timeCET = time->Convert() - 60*60*2; // CET (Central European Time) = Moscow Winter Time - 2 hs time->Set(timeCET,false); + found = true; // }; // @@ -1139,6 +1142,7 @@ // UInt_t timeCEST = time->Convert() - 60*60*1; // CEST (Central European Summer Time) = Moscow Winter Time - 1 h time->Set(timeCEST,false); + found = true; // }; // @@ -1146,9 +1150,15 @@ // UInt_t timeMSD = time->Convert() + 60*60*1; // MSD (Moscow Summer Time) = Moscow Winter Time + 1 h time->Set(timeMSD,false); + found = true; // }; // + if ( !found && strcmp(tzone.Data(),"MSK") && strcmp(tzone.Data(),"") ){ + printf("\n Unknown time zone %s using MSK \n",tzone.Data()); + tzone = "MSK"; + }; + // rtime = time->AsSQLString(); // return(rtime); @@ -1162,17 +1172,20 @@ * @param tzone Time Zone, can be UTC,GMT,CET,CEST,MSD default is MSK * */ -TString GL_TIMESYNC::UnConvertTime(TString tzone, UInt_t dbt){ +TString GL_TIMESYNC::UnConvertTime(TString &tzone, UInt_t dbt){ // TDatime *time = new TDatime(); TString rtime; // + Bool_t found = false; + // 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); + found = true; // }; // @@ -1180,6 +1193,7 @@ // UInt_t timeCET = time->Convert() + 60*60*2; // CET (Central European Time) + 2 hs = Moscow Winter Time time->Set(timeCET,false); + found = true; // }; // @@ -1187,14 +1201,22 @@ // UInt_t timeCEST = time->Convert() + 60*60*1; // CEST (Central European Summer Time) + 1 h = Moscow Winter Time time->Set(timeCEST,false); + found = true; // }; // - if ( !strcmp(tzone.Data(),"MSD") ){ + if ( !strcmp(tzone.Data(),"MSD") || !strcmp(tzone.Data(),"MST") ){ // UInt_t timeMSD = time->Convert() - 60*60*1; // MSD (Moscow Summer Time) - 1 h = Moscow Winter Time time->Set(timeMSD,false); + found = true; + // + }; + // + if ( !found && strcmp(tzone.Data(),"MSK") && strcmp(tzone.Data(),"") ){ // + printf("\n Unknown time zone %s using MSK \n",tzone.Data()); + tzone = "MSK"; }; // rtime = time->AsSQLString();