Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362610 - dateTimeLib.dateFromInt using 1899-12-31 rather than 1969-12-31
Summary: dateTimeLib.dateFromInt using 1899-12-31 rather than 1969-12-31
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 19:56 EDT by broy2 CLA
Modified: 2017-02-23 14:15 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description broy2 CLA 2011-11-01 19:56:12 EDT
dateTimeLib.dateFromInt
This function should create a date using int as a number of days after a
starting point date: 1969-12-31.

Looks like the starting date for JavaScript is 1899-12-31.

See Bug 358495.

library dateFromInt
    myDate date;
    myString string;	
    function dateFromInt(){@Test}
        myDate = dateTimeLib.dateFromInt(25);
        myString = StringLib.format(myDate, "MM/dd/yyyy");
        LogResult.assertStringEqual("dateFromInt", "01/25/1970", myString);
    end	
end

dateFromInt - Failed: Expected value = '01/25/1970' Actual value = '01/25/1900'
Comment 1 broy2 CLA 2011-11-21 15:41:20 EST
Fixed in 20111121 build.
Comment 2 broy2 CLA 2011-11-21 15:41:32 EST
Verified.