<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Basic Time function returns inconsistent datatype"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=136112">136112</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Basic Time function returns inconsistent datatype
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Inherited From OOo
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>BASIC
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>alain.romedenne@libreoffice.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>