Changeset 538 for XIOS/trunk/src/node/file.cpp
- Timestamp:
- 12/11/14 16:07:42 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/file.cpp
r528 r538 189 189 CContext* context = CContext::getCurrent() ; 190 190 CDate& currentDate=context->calendar->getCurrentDate() ; 191 if (! 191 if (!sync_freq.isEmpty()) 192 192 { 193 if (*lastSync +syncFreq< currentDate)193 if (*lastSync + sync_freq.getValue() < currentDate) 194 194 { 195 195 *lastSync=currentDate ; … … 207 207 CContextServer* server=context->server ; 208 208 209 if (! sync_freq.isEmpty()) syncFreq = CDuration::FromString(sync_freq.getValue());210 if (! split_freq.isEmpty()) splitFreq = CDuration::FromString(split_freq.getValue());211 if (! output_freq.isEmpty()) outputFreq = CDuration::FromString(output_freq.getValue());212 209 lastSync=new CDate(currentDate) ; 213 210 lastSplit=new CDate(currentDate) ; … … 253 250 CContext* context = CContext::getCurrent() ; 254 251 CDate& currentDate=context->calendar->getCurrentDate() ; 255 if (! 252 if (!sync_freq.isEmpty()) 256 253 { 257 if (*lastSync +syncFreq<= currentDate)254 if (*lastSync + sync_freq.getValue() <= currentDate) 258 255 { 259 256 *lastSync=currentDate ; … … 275 272 CContext* context = CContext::getCurrent() ; 276 273 CDate& currentDate=context->calendar->getCurrentDate() ; 277 if (! 274 if (!split_freq.isEmpty()) 278 275 { 279 if (currentDate > *lastSplit +splitFreq)276 if (currentDate > *lastSplit + split_freq.getValue()) 280 277 { 281 *lastSplit =*lastSplit+splitFreq;278 *lastSplit = *lastSplit + split_freq.getValue(); 282 279 std::vector<CField*>::iterator it, end = this->enabledFields.end(); 283 280 for (it = this->enabledFields.begin() ;it != end; it++) (*it)->resetNStep() ; … … 304 301 oss << filename; 305 302 if (!name_suffix.isEmpty()) oss << name_suffix.getValue(); 306 // if (!split_freq.isEmpty()) oss<<"_"<<lastSplit->getStryyyymmdd()<<"-"<< (*lastSplit+(splitFreq-1*Second)).getStryyyymmdd(); 307 // if (!split_freq.isEmpty()) oss<<"_"<<lastSplit->getStr("%y_%mo_%d")<<"-"<< (*lastSplit+(splitFreq-1*Second)).getStr("%y_%mo_%d"); 303 308 304 if (!split_freq.isEmpty()) 309 305 { … … 311 307 if (split_freq_format.isEmpty()) 312 308 { 313 if (split Freq.second!=0) splitFormat="%y%mo%d%h%mi%s";314 else if (split Freq.minute!=0) splitFormat="%y%mo%d%h%mi";315 else if (split Freq.hour!=0) splitFormat="%y%mo%d%h";316 else if (split Freq.day!=0) splitFormat="%y%mo%d";317 else if (split Freq.month!=0) splitFormat="%y%mo";318 else splitFormat ="%y";309 if (split_freq.getValue().second != 0) splitFormat = "%y%mo%d%h%mi%s"; 310 else if (split_freq.getValue().minute != 0) splitFormat = "%y%mo%d%h%mi"; 311 else if (split_freq.getValue().hour != 0) splitFormat = "%y%mo%d%h"; 312 else if (split_freq.getValue().day != 0) splitFormat = "%y%mo%d"; 313 else if (split_freq.getValue().month != 0) splitFormat = "%y%mo"; 314 else splitFormat = "%y"; 319 315 } 320 316 else splitFormat=split_freq_format ; 321 oss<<"_"<<lastSplit->getStr(splitFormat)<<"-"<< (*lastSplit+(splitFreq-1*Second)).getStr(splitFormat); 317 oss << "_" << lastSplit->getStr(splitFormat) 318 << "-" << (*lastSplit + (split_freq.getValue() - 1 * Second)).getStr(splitFormat); 322 319 } 323 320
Note: See TracChangeset
for help on using the changeset viewer.