Project

General

Profile

Actions

Bug #2073

closed

WDate and Dbo find with invalid date problem

Added by Saif Rehman over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
07/31/2013
Due date:
% Done:

0%

Estimated time:

Description

Hi, I found 2 problems with WDate,

Firstly, when I was adding a Dbo to session with extreme values I found that the out of range WDate

WDate::fromString("31/07/9999", "dd/MM/yyyy").addDays(360) was being added to the database without any exception being throw. I checked and WDate::isValid() was returning true. The problem is with addDays/Month/Year since it does not reset the date's validity. I don't know weather boost gregorian date supports after year 9999.

Secondly, due to this problem I found that when selecting an invalid date (00/00/0000) from the database, Wt::Dbo throws a fatal error exception. Correct me if I'm wrong but I believe that instead of throwing that exception, an invalid date should be set in the Dbo ptr.

Actions #1

Updated by Koen Deforche over 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.3.1
Actions #2

Updated by Koen Deforche over 11 years ago

  • Status changed from InProgress to Resolved
Actions #3

Updated by Koen Deforche over 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF