-
Available since OmniFaces 3.6
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.
Raw Temporal#toString()
value of #{startup}
: 2024-09-16T13:13:01.379073+02:00[Europe/Amsterdam] - this should represent same format as java.time.ZonedDateTime
Formatted using of:formatDate()
function: 2024-09-16 13:13:01
As java.time.Instant
: 2024-09-16T11:13:01.379073Z - this should represent UTC
Formatted using of:formatDate()
function: 2024-09-16 11:13:01
As java.time.ZonedDateTime
: 2024-09-16T13:13:01.379073+02:00[Europe/Amsterdam]
Formatted using of:formatDate()
function: 2024-09-16 13:13:01
As epoch time
: 1726485181379
<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>of:formatDate()</code> function: #{of: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>of:formatDate()</code> function: #{of: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>of:formatDate()</code> function: #{of:formatDate(startup.zonedDateTime, 'yyyy-MM-dd HH:mm:ss')}
</p>
<hr/>
<p>
As <code>epoch time</code>: <strong>#{startup.time}</strong>
</p>