/[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.10 by mocchiut, Tue Sep 19 09:18:46 2006 UTC revision 1.11 by mocchiut, Fri Sep 22 09:18:06 2006 UTC
# Line 1120  TString GL_TIMESYNC::ConvertTime(TString Line 1120  TString GL_TIMESYNC::ConvertTime(TString
1120    TString rtime;    TString rtime;
1121    Bool_t found = false;    Bool_t found = false;
1122    //    //
1123    time->Set(dbt,false); // MSK = Moscow Winter Time    time->Set(dbt,false); // UTC (Coordinated Universal Time)  
1124    //    //
1125    if ( !strcmp(tzone.Data(),"UTC") || !strcmp(tzone.Data(),"GMT") ){    if ( !strcmp(tzone.Data(),"MSK") || !strcmp(tzone.Data(),"MWT") ){
1126      //      //
1127      UInt_t timeUTC = time->Convert() - 60*60*3; // UTC (Coordinated Universal Time) = Moscow Winter Time - 3 hs      UInt_t timeMSK = time->Convert() + 60*60*3; // UTC (Coordinated Universal Time) + 3hs = Moscow Winter Time
1128      time->Set(timeUTC,false);      time->Set(timeMSK,false);
1129      found = true;      found = true;
1130      //      //
1131    };    };
1132    //    //
1133    if ( !strcmp(tzone.Data(),"CET") ){    if ( !strcmp(tzone.Data(),"CET") ){
1134      //      //
1135      UInt_t timeCET = time->Convert() - 60*60*2; // CET (Central European Time) = Moscow Winter Time - 2 hs      UInt_t timeCET = time->Convert() + 60*60*1; // CET (Central European Time) = UTC + 1 hs
1136      time->Set(timeCET,false);      time->Set(timeCET,false);
1137      found = true;      found = true;
1138      //      //
# Line 1140  TString GL_TIMESYNC::ConvertTime(TString Line 1140  TString GL_TIMESYNC::ConvertTime(TString
1140    //    //
1141    if ( !strcmp(tzone.Data(),"CEST") ){    if ( !strcmp(tzone.Data(),"CEST") ){
1142      //      //
1143      UInt_t timeCEST = time->Convert() - 60*60*1; // CEST (Central European Summer Time) = Moscow Winter Time - 1 h      UInt_t timeCEST = time->Convert() + 60*60*2; // CEST (Central European Summer Time) = UTC + 2 h
1144      time->Set(timeCEST,false);      time->Set(timeCEST,false);
1145      found = true;      found = true;
1146      //      //
1147    };    };
1148    //    //
1149    if ( !strcmp(tzone.Data(),"MSD") ){    if ( !strcmp(tzone.Data(),"MSD") || !strcmp(tzone.Data(),"MST")){
1150      //      //
1151      UInt_t timeMSD = time->Convert() + 60*60*1; // MSD (Moscow Summer Time) = Moscow Winter Time + 1 h      UInt_t timeMSD = time->Convert() + 60*60*4; // MSD (Moscow Summer Time) = UTC + 4 h
1152      time->Set(timeMSD,false);      time->Set(timeMSD,false);
1153      found = true;      found = true;
1154      //      //
1155    };    };
1156    //    //
1157    if ( !found && strcmp(tzone.Data(),"MSK") && strcmp(tzone.Data(),"") ){    if ( !found && strcmp(tzone.Data(),"UTC") && strcmp(tzone.Data(),"GMT") && strcmp(tzone.Data(),"") ){
1158      printf("\n Unknown time zone %s using MSK \n",tzone.Data());      printf("\n Unknown time zone %s using UTC \n",tzone.Data());
1159      tzone = "MSK";      tzone = "UTC";
1160    };    };
1161    //    //
1162    rtime = time->AsSQLString();    rtime = time->AsSQLString();
# Line 1179  TString GL_TIMESYNC::UnConvertTime(TStri Line 1179  TString GL_TIMESYNC::UnConvertTime(TStri
1179    //    //
1180    Bool_t found = false;    Bool_t found = false;
1181    //    //
1182    time->Set(dbt,false); // MSK = Moscow Winter Time    time->Set(dbt,false); // tzone
1183    //    //
1184    if ( !strcmp(tzone.Data(),"UTC") || !strcmp(tzone.Data(),"GMT") ){    if ( !strcmp(tzone.Data(),"MSK") || !strcmp(tzone.Data(),"MWT") ){
1185      //      //
1186      UInt_t timeUTC = time->Convert() + 60*60*3; // UTC (Coordinated Universal Time) +3 hs = Moscow Winter Time      UInt_t timeUTC = time->Convert() - 60*60*3; // UTC (Coordinated Universal Time) = Moscow Winter Time - 3hs
1187      time->Set(timeUTC,false);      time->Set(timeUTC,false);
1188      found = true;      found = true;
1189      //      //
# Line 1191  TString GL_TIMESYNC::UnConvertTime(TStri Line 1191  TString GL_TIMESYNC::UnConvertTime(TStri
1191    //    //
1192    if ( !strcmp(tzone.Data(),"CET") ){    if ( !strcmp(tzone.Data(),"CET") ){
1193      //      //
1194      UInt_t timeCET = time->Convert() + 60*60*2; // CET (Central European Time) + 2 hs = Moscow Winter Time        UInt_t timeCET = time->Convert() - 60*60*1; // CET (Central European Time) - 1 hs = UTC  
1195      time->Set(timeCET,false);      time->Set(timeCET,false);
1196      found = true;      found = true;
1197      //      //
# Line 1199  TString GL_TIMESYNC::UnConvertTime(TStri Line 1199  TString GL_TIMESYNC::UnConvertTime(TStri
1199    //    //
1200    if ( !strcmp(tzone.Data(),"CEST") ){    if ( !strcmp(tzone.Data(),"CEST") ){
1201      //      //
1202      UInt_t timeCEST = time->Convert() + 60*60*1; // CEST (Central European Summer Time) + 1 h = Moscow Winter Time      UInt_t timeCEST = time->Convert() - 60*60*2; // CEST (Central European Summer Time) - 2 h = UTC
1203      time->Set(timeCEST,false);      time->Set(timeCEST,false);
1204      found = true;      found = true;
1205      //      //
# Line 1207  TString GL_TIMESYNC::UnConvertTime(TStri Line 1207  TString GL_TIMESYNC::UnConvertTime(TStri
1207    //    //
1208    if ( !strcmp(tzone.Data(),"MSD") || !strcmp(tzone.Data(),"MST") ){    if ( !strcmp(tzone.Data(),"MSD") || !strcmp(tzone.Data(),"MST") ){
1209      //      //
1210      UInt_t timeMSD = time->Convert() - 60*60*1; // MSD (Moscow Summer Time) - 1 h = Moscow Winter Time      UInt_t timeMSD = time->Convert() - 60*60*4; // MSD (Moscow Summer Time) - 4 h = UTC
1211      time->Set(timeMSD,false);      time->Set(timeMSD,false);
1212      found = true;      found = true;
1213      //      //
1214    };    };
1215    //    //
1216    if ( !found && strcmp(tzone.Data(),"MSK") && strcmp(tzone.Data(),"") ){    if ( !found && strcmp(tzone.Data(),"UTC") && strcmp(tzone.Data(),"GMT") && strcmp(tzone.Data(),"") ){
1217      //      //
1218      printf("\n Unknown time zone %s using MSK \n",tzone.Data());      printf("\n Unknown time zone %s using UTC \n",tzone.Data());
1219      tzone = "MSK";      tzone = "UTC";
1220    };    };
1221    //    //
1222    rtime = time->AsSQLString();    rtime = time->AsSQLString();

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.23