- 

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}: Wed Jun 20 19:25:34 CEST 2018

Formatted date using of:formatDate() function: 2018-06-20 19:25:34

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>