Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

Time

Time() -> cTime

Gets the system clock as text.

TimeAdvPL
01 · OVERVIEW

Overview

Returns hh:mm:ss from the executing system’s clock. It includes neither date nor time zone and may repeat. It is not a unique identifier, monotonic measurement or cross-server ordering proof. The example only displays its type and current clock value. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

Time() -> cTime

Return value

Character.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed690()
    Local cTime := Time()
    // Wall clock: do not use as a unique identifier.
    ConOut(ValType(cTime))
    ConOut(cTime)
Return Nil
Expected result

Displays C and a variable hh:mm:ss time. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • For auditing define date, zone and clock source; evaluate a dedicated duration API.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. Time. Sintaxe e observações. TDN. Accessed on 2026-10-28.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha