Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345310 - Inconsistent output for BirtDateTime.diffSecond
Summary: Inconsistent output for BirtDateTime.diffSecond
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.5.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 2.6.2   Edit
Assignee: Birt-Data-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard: Need-Auto
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 14:27 EDT by Missing name CLA
Modified: 2011-05-17 02:23 EDT (History)
1 user (show)

See Also:


Attachments
test report (18.04 KB, application/octet-stream)
2011-05-13 02:23 EDT, Xiaoying Gu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2011-05-10 14:27:32 EDT
Sometime following gives -60 when "from date" is greater than "to date" and some time it gives 43190. (when there is a minut diffrence)

dateFrom = params["Date From"].value;
dateTo = params["Date To"].value;
BirtDateTime.diffSecond(dateFrom,dateTo)
Comment 1 Xiaoying Gu CLA 2011-05-13 01:40:12 EDT
Could you please give me the detail value of your parameter which can reproduce this issue?

I tried with 2.5.2 release with below parameter value and did not reproduce the issue:
dateFrom:2012-5-13 13:31:00
dateTo:2011-5-13 13:30:00
Comment 2 Missing name CLA 2011-05-13 02:05:36 EDT
1) From Date and To Date of Type Date Time
2) Format for these are custom (MM/dd/yyyy hh:mm)

Thanks,
Vj~
Comment 3 Xiaoying Gu CLA 2011-05-13 02:22:21 EDT
(In reply to comment #2)
> 1) From Date and To Date of Type Date Time
> 2) Format for these are custom (MM/dd/yyyy hh:mm)
> 
> Thanks,
> Vj~

I was using the datetime type and custom format(MM/dd/yyyy hh:mm). 
Please see my attached report design.
Comment 4 Xiaoying Gu CLA 2011-05-13 02:23:06 EDT
Created attachment 195558 [details]
test report
Comment 5 Missing name CLA 2011-05-13 09:59:49 EDT
Thanks You Sir,

That helps a lot , now only quetion i have is why does it  [ BirtDateTime.diffSecond(dateFrom2,dateTo2)]  shows -31622400
even though value of to and from date is same.
Comment 6 Xiaoying Gu CLA 2011-05-15 21:53:15 EDT
(In reply to comment #5)
> Thanks You Sir,
> 
> That helps a lot , now only quetion i have is why does it  [
> BirtDateTime.diffSecond(dateFrom2,dateTo2)]  shows -31622400
> even though value of to and from date is same.

It seems that this is a bug in the 2.5.2 release.
But I can not reproduce this issue in the latest 2.6.2 release build.
Please have a try with the latest 2.6.2 build.
Comment 7 Xiaoying Gu CLA 2011-05-17 02:23:12 EDT
Set as fixed based on comment #6.