ctrl k
Fixing range intervals (#18)
Merged
Lukas Iklé opened 2 years ago
No description
Commits were merged into target branch
  • src/interval.c
    ■ ■ ■ ■ ■ ■
    skipped 251 lines
    252 252   }
    253 253   
    254 254   base->tm_mday = strtol(pos, &pos, 10);
     255 + 
    255 256   if (*pos == end) {
    256 257   goto end;
    257 258   }
    skipped 47 lines
    305 306   }
    306 307   
    307 308  end:
     309 + if (base->tm_mday == 0) {
     310 + base->tm_mon++;
     311 + }
     312 + 
    308 313   if (end_pos != NULL) {
    309 314   *end_pos = pos;
    310 315   }
    skipped 35 lines
    346 351   } else if (ziit_strcasecmp_term("now", str, end) == 0) {
    347 352   *ts = time(NULL);
    348 353   } else {
    349  - base->tm_year = 0;
    350  - base->tm_mon = 0;
    351  - base->tm_mday = 1;
    352  - base->tm_hour = 0;
    353  - base->tm_min = 0;
    354  - base->tm_sec = 0;
    355  - base->tm_isdst = -1;
    356 354   if (ziit_parse_ts_date(str, base, end, ts, end_pos) < 0) {
    357 355   return -1;
    358 356   }
    skipped 20 lines
    379 377   
    380 378   to.tm_year = 0;
    381 379   to.tm_mon = 11;
    382  - to.tm_mday = 1;
     380 + to.tm_mday = 0;
    383 381   to.tm_hour = 23;
    384 382   to.tm_min = 59;
    385 383   to.tm_sec = 59;
    skipped 28 lines
    414 412   
    415 413   to.tm_year = 0;
    416 414   to.tm_mon = 11;
    417  - to.tm_mday = 1;
     415 + to.tm_mday = 0;
    418 416   to.tm_hour = 23;
    419 417   to.tm_min = 59;
    420 418   to.tm_sec = 59;
    skipped 97 lines
pull request 1/1
Submitter Lukas Iklé
Target master
Source fixing-range-intervals
Reviewers
Assignees
Merge Strategy
Create Merge Commit
Watchers (2)
Reference
pull request acosom/ziit/ziit-cli#18
Please wait...
Page is in error, reload to recover