/[PAMELA software]/YodaProfiler/src/GLTables.cpp
ViewVC logotype

Diff of /YodaProfiler/src/GLTables.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mocchiut, Wed Sep 6 11:04:39 2006 UTC revision 1.6 by mocchiut, Wed Sep 6 12:47:18 2006 UTC
# Line 1098  TString GL_TIMESYNC::ConvertTime(TString Line 1098  TString GL_TIMESYNC::ConvertTime(TString
1098    //    //
1099    return(rtime);    return(rtime);
1100  }  }
1101    
1102    /*
1103     *
1104     * Convert the time in the DB from UInt_t to a string
1105     *
1106     * @param dbt time in the DB
1107     * @param tzone Time Zone, can be UTC,GMT,CET,CEST,MSD default is MSK
1108     *
1109     */
1110    TString GL_TIMESYNC::UnConvertTime(TString tzone, UInt_t dbt){
1111      //
1112      TDatime *time = new TDatime();
1113      TString rtime;
1114      //
1115      time->Set(dbt,false); // MSK = Moscow Winter Time
1116      //
1117      if ( !strcmp(tzone.Data(),"UTC") || !strcmp(tzone.Data(),"GMT") ){
1118        //
1119        UInt_t timeUTC = time->Convert() + 60*60*3; // UTC (Coordinated Universal Time) +3 hs = Moscow Winter Time
1120        time->Set(timeUTC,false);
1121        //
1122      };
1123      //
1124      if ( !strcmp(tzone.Data(),"CET") ){
1125        //
1126        UInt_t timeCET = time->Convert() + 60*60*2; // CET (Central European Time) + 2 hs = Moscow Winter Time  
1127        time->Set(timeCET,false);
1128        //
1129      };
1130      //
1131      if ( !strcmp(tzone.Data(),"CEST") ){
1132        //
1133        UInt_t timeCEST = time->Convert() + 60*60*1; // CEST (Central European Summer Time) + 1 h = Moscow Winter Time
1134        time->Set(timeCEST,false);
1135        //
1136      };
1137      //
1138      if ( !strcmp(tzone.Data(),"MSD") ){
1139        //
1140        UInt_t timeMSD = time->Convert() - 60*60*1; // MSD (Moscow Summer Time) - 1 h = Moscow Winter Time
1141        time->Set(timeMSD,false);
1142        //
1143      };
1144      //
1145      rtime = time->AsSQLString();
1146      //
1147      return(rtime);
1148    }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.23