-
The builtin managed bean #{startup} returns you the
java.time.temporal.Temporal
instance representing the server's startup time in server's default time zone.
The implementation is provided by org.omnifaces.cdi.config.DateProducer.TemporalDate
which is essentially written as a CDI proxy for java.time.ZonedDateTime because it's a final class.
Historical notice: before OmniFaces 3.6, it returned since OmniFaces 1.0 an instance of java.util.Date
via a <managed-bean> entry in faces-config.xml.
Raw Temporal#toString() value of #{startup}: 2026-02-12T09:09:54.422300468-06:00[America/Chicago] - this should represent same format as java.time.ZonedDateTime
Formatted using o:formatDate() function: 2026-02-12 09:09:54
As java.time.Instant: 2026-02-12T15:09:54.422300468Z - this should represent UTC
Formatted using o:formatDate() function: 2026-02-12 15:09:54
As java.time.ZonedDateTime: 2026-02-12T09:09:54.422300468-06:00[America/Chicago]
Formatted using o:formatDate() function: 2026-02-12 09:09:54
As java.time.LocalDateTime: 2026-02-16T10:35:07.259725864
Formatted using o:formatDate() function: 2026-02-16 10:35:07
As java.time.LocalDate: 2026-02-16
Formatted using o:formatDate() function: 2026-02-16
As epoch time: 1770908994422
<p>
Raw <code>Temporal#toString()</code> value of <code>\#{startup}</code>: <strong>#{startup}</strong> - this should represent same format as <code>java.time.ZonedDateTime</code>
</p>
<p>
Formatted using <code>o:formatDate()</code> function: #{o:formatDate(startup, 'yyyy-MM-dd HH:mm:ss')}
</p>
<hr/>
<p>
As <code>java.time.Instant</code>: <strong>#{startup.instant}</strong> - this should represent UTC
</p>
<p>
Formatted using <code>o:formatDate()</code> function: #{o:formatDate(startup.instant, 'yyyy-MM-dd HH:mm:ss')}
</p>
<hr/>
<p>
As <code>java.time.ZonedDateTime</code>: <strong>#{startup.zonedDateTime}</strong>
</p>
<p>
Formatted using <code>o:formatDate()</code> function: #{o:formatDate(startup.zonedDateTime, 'yyyy-MM-dd HH:mm:ss')}
</p>
<hr/>
<p>
As <code>java.time.LocalDateTime</code>: <strong>#{now.localDateTime}</strong>
</p>
<p>
Formatted using <code>o:formatDate()</code> function: #{o:formatDate(now.localDateTime, 'yyyy-MM-dd HH:mm:ss')}
</p>
<hr/>
<p>
As <code>java.time.LocalDate</code>: <strong>#{now.localDate}</strong>
</p>
<p>
Formatted using <code>o:formatDate()</code> function: #{o:formatDate(now.localDate, 'yyyy-MM-dd')}
</p>
<hr/>
<p>
As <code>epoch time</code>: <strong>#{startup.time}</strong>
</p>