[Libreoffice-bugs] [Bug 136112] New: Basic Time function returns inconsistent datatype

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Aug 25 14:25:37 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=136112

            Bug ID: 136112
           Summary: Basic Time function returns inconsistent datatype
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: alain.romedenne at libreoffice.org

Description:
Time and Time$ both return a String, while the former should return a Variant
(Date) which would be consistent with VBA.

Time should be documented as a function - not as a statement - as changing time
on Unix platforms requires admin privilege. Time statement does not function
under Windows and should therefore be marked as unsupported. 

Steps to Reproduce:
1. Example Basic code:
Private Sub _Time_
        CompatibilityMode(True)
        Print TypeName(Time()), VarType(Time), TypeName(Time$),
VarType(Time$())
        Time = "18:20:15" ' does nothing
        CompatibilityMode(False)
End Sub
2. Run and observe the routine results


Actual Results:
Time$ returns a locale-dependant String output
Time  returns a locale-dependant String output

Expected Results:
Time$ to return a locale-dependant String output
Time to return a Variant of Type 7 (Date/Time)


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.4.2 (x64)
Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 12; OS: Windows 10.0 Build 17134; UI render: default; VCL: win; 
Locale: en-GB (en_IE); UI-Language: en-GB
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200825/622c4476/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list