Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

SmartDate Issue

$
0
0

Hi,

I am using CSLA 3.8 version. In this version I am facing some date time conversion issues with SmartDate.

 

For Example:-

Host environment has Date format as “DD/MM/YYYY”

Client environment has Date format as “MM/DD/YYYY”.

 

Case 1

a.     A SmartDate object is created at host for the value “6 July 2013”.

b.    The object will store information in string format as “06/07/2013”.

 

Result: When this object is queried at UI, it will convert string value to datetime type object, which will return “7 June 2013”.

 

 

Case 2

a.     A SmartDate object is created at host for the value “26 July 2013”.

b.    The object will store information in string format as “26/07/2013”.

 

Result: When this object is queried at UI, it will try to convert string value to datetime type object, which will return a null value. This will cause an exception at the UI.

 

Case 3

a.     A business object is using SmartDate type property to save date information to database.

b.    Another object is using DateTime type property to get date information from the same database.

 

Result: Return value will be different from the original one.

To address the same I have modified SmartDate class. I request to support team to review my changes in attached file(rename it .cs) and let me know the changes are not going to crash the framework in any scenario. 


Viewing all articles
Browse latest Browse all 764

Trending Articles