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 |
// |
// |
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(); |
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 |
// |
// |
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 |
// |
// |
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 |
// |
// |
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(); |