Bug 72297

Summary: BASIC: CDateFromUnoDateTime does not work!
Product: LibreOffice Reporter: Thomas Krumbein <tk>
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: medium    
Version: 4.1.2.3 release   
Hardware: Other   
OS: Windows (All)   
Whiteboard: BSA
i915 platform: i915 features:
Attachments: XRAY aStruct - correct createDate values

Description Thomas Krumbein 2013-12-04 09:00:15 UTC
Created attachment 90208 [details]
XRAY aStruct - correct createDate values

Problem description: 

the function CDateFromUnoDateTime does not work as expected.

Steps to reproduce:

Try the following code:

sub test
 dim d as double

 aStruct = CDateToUnoDateTime(now())

 xray aStruct   'correct values

 d = CDatefromUnoDateTime(aStruct)  

 msgbox d   'result is something like 7,43823647510086E+173

end sub

If d is a string, result will be something like "20.12.-3741".

Results are equal when you try to get f.e. the creation date of a document:

sub GetCreationDateDoc
  odoc = thisComponent
  aStruct = oDoc.getDocumentProperties.creationDate
  d = CDatefromUnoDateTime(aStruct)  
  msgbox d   'result is something like "20.12.-3741"
end sub

The values of the struct is correct - maybe the nanoseconds are ??, but generally everything is ok (see attached picture)

So I believe the function CDateFromUnoDateTime is not working correct.


 

Current behavior:

Expected behavior:

              
Operating System: Windows 7
Version: 4.1.2.3 release
Comment 1 Thomas Krumbein 2013-12-04 12:05:19 UTC
Edit:

Seems to be fixed in LibO Version 4.2.0.0 

Now Value of CDateFromUnoDateTime is correct :)
Comment 2 Jacques Guilleron 2013-12-04 16:48:15 UTC
Hi Thomas,

According to your last comment, I set this report to NOTABUG.

Kind regards,

Jacques
Comment 3 Terrence Enger 2013-12-05 01:54:56 UTC
Based merely on the originally assigned version and comment I am changing the resolution to WORKSFORME.  This is the resolution to use when a bug has been fixed but we do not know what the fix was.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.