- 

Available since OmniFaces 1.0

The builtin managed bean #{now} returns you the java.util.Date instance representing the current time.

Demo

Raw Date#toString() value of #{now}: Mon Aug 20 07:00:29 CEST 2018

Formatted date using of:formatDate() function: 2018-08-20 07:00:29

Demo source code
<p>
    Raw <code>Date#toString()</code> value of <code>\#{now}</code>: #{now}
</p>
<p>
    Formatted date using <code>of:formatDate()</code> function: #{of:formatDate(now, 'yyyy-MM-dd HH:mm:ss')}
</p>

<h:form>
    <h:commandButton value="Refresh">
        <f:ajax render=":demo" />
    </h:commandButton>
</h:form>