(file) Return to CIMDateTime.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/CIMDateTime.cpp between version 1.46 and 1.47

version 1.46, 2004/12/19 00:15:57 version 1.47, 2005/01/04 12:16:14
Line 210 
Line 210 
 void CIMDateTimeRep::set_data(const String & value, Uint32 index, Uint32 size) void CIMDateTimeRep::set_data(const String & value, Uint32 index, Uint32 size)
 { {
     for (Uint32 i=0; i < size; i++) {     for (Uint32 i=0; i < size; i++) {
         data[index+i] = value[i];          data[index+i] = (char) value[i];
     }     }
 } }
  
Line 386 
Line 386 
  
     send string to set()     send string to set()
  */  */
 CIMDateTime::CIMDateTime(const Uint64 microSec, Boolean interval)  CIMDateTime::CIMDateTime(Uint64 microSec, Boolean interval)
 { {
     if (microSec >= _TEN_THOUSAND_YEARS && !interval) { //time stamps must be less then number of micro Seconds in 10,000 years     if (microSec >= _TEN_THOUSAND_YEARS && !interval) { //time stamps must be less then number of micro Seconds in 10,000 years
         MessageLoaderParms parmsTS("Common.Exception.DATETIME_OUT_OF_RANGE_EXCEPTION",         MessageLoaderParms parmsTS("Common.Exception.DATETIME_OUT_OF_RANGE_EXCEPTION",
Line 403 
Line 403 
     //Set of Strings that hold part parts of datetime    100,000,000     //Set of Strings that hold part parts of datetime    100,000,000
     String year, ye_mo, ye_mo_da, ye_mo_da_ho, ye_mo_da_ho_mn, ye_mo_da_ho_mn_se, final;     String year, ye_mo, ye_mo_da, ye_mo_da_ho, ye_mo_da_ho_mn, ye_mo_da_ho_mn_se, final;
  
     Uint32 day_sub1 = microSec/_ONE_DAY;      Uint32 day_sub1 = (Uint32)(microSec/_ONE_DAY);
     Uint32 days_in400 = 146097;     Uint32 days_in400 = 146097;
  
     if (!interval) {     if (!interval) {
Line 552 
Line 552 
     //get hours, minutes, seconds and microseconds     //get hours, minutes, seconds and microseconds
     Uint64 after_ymd = microSec%_ONE_DAY;     Uint64 after_ymd = microSec%_ONE_DAY;
  
     Uint32 hour_num = after_ymd/_ONE_HOUR;      Uint32 hour_num = (Uint32)(after_ymd/_ONE_HOUR);
     Uint32 after_ymdh = after_ymd%_ONE_HOUR;      Uint32 after_ymdh = (Uint32)(after_ymd%_ONE_HOUR);
  
     Uint32 min_num = after_ymdh/_ONE_MINUTE;     Uint32 min_num = after_ymdh/_ONE_MINUTE;
     Uint32 after_ymdhm = after_ymdh%_ONE_MINUTE;     Uint32 after_ymdhm = after_ymdh%_ONE_MINUTE;
Line 918 
Line 918 
         return false;           // seconds field has both wildcards and digits         return false;           // seconds field has both wildcards and digits
     }     }
  
   
     else if (ans == ONLY_DIGITS) {          // minutes field has only digits     else if (ans == ONLY_DIGITS) {          // minutes field has only digits
         long seconds = atoi(buffer.getCString());         long seconds = atoi(buffer.getCString());
         if (seconds > 59){         if (seconds > 59){
Line 1207 
Line 1208 
  
     Uint64 un_normNum = this->_toMicroSeconds();     Uint64 un_normNum = this->_toMicroSeconds();
  
     Uint32 unnor = un_normNum/PEGASUS_UINT64_LITERAL(1000000000);     // Uint32 unnor = un_normNum/PEGASUS_UINT64_LITERAL(1000000000);
     Uint32 runnor = un_normNum%PEGASUS_UINT64_LITERAL(1000000000);     // Uint32 runnor = un_normNum%PEGASUS_UINT64_LITERAL(1000000000);
  
     // get UTC offSet and change it in microseconds     // get UTC offSet and change it in microseconds
     String utcOS = _rep->utcOffSet.subString(1,3);     String utcOS = _rep->utcOffSet.subString(1,3);
Line 1231 
Line 1232 
         if ( sign == '-' ) {         if ( sign == '-' ) {
             if (_TEN_THOUSAND_YEARS < (un_normNum + (offSet_hor + offSet_min))){             if (_TEN_THOUSAND_YEARS < (un_normNum + (offSet_hor + offSet_min))){
                 cout << " this is value " << this->toString() << endl;                 cout << " this is value " << this->toString() << endl;
                 cout << "number back form: " << unnor << " rema: " << runnor << endl;  
                 throw DateTimeOutOfRangeException(parmsOv);                 throw DateTimeOutOfRangeException(parmsOv);
             }             }
             normNum = un_normNum + (offSet_hor + offSet_min);             normNum = un_normNum + (offSet_hor + offSet_min);


Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2