Bug 72297 - BASIC: CDateFromUnoDateTime does not work!
Summary: BASIC: CDateFromUnoDateTime does not work!
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected) release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
Whiteboard: BSA
Depends on:
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:

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

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: release
Comment 1 Thomas Krumbein 2013-12-04 12:05:19 UTC

Seems to be fixed in LibO Version 

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,

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.