Bug 72297 - BASIC: CDateFromUnoDateTime does not work!
Summary: BASIC: CDateFromUnoDateTime does not work!
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-04 09:00 UTC by Thomas Krumbein
Modified: 2013-12-05 01:54 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
XRAY aStruct - correct createDate values (30.11 KB, image/png)
2013-12-04 09:00 UTC, Thomas Krumbein
Details

Note You need to log in before you can comment on or make changes to this bug.
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.