[#BloombergLP-bdlt-TimeUtil-fromHms] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/TimeUtil.adoc[TimeUtil]::fromHms :relfileprefix: ../../../ :mrdocs: Return an optional `Time` built from the specified clock fields. == Synopsis Declared in `<bdlt_timeutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:bsl/optional-072.adoc[bsl::optional<Time>] fromHms( int hour, int minute, int second, int millisecond = 0, int microsecond = 0); ---- == Description Return an `optional` having a `Time` with the specified `hour`, `minute`, `second`, and the optionally specified `millisecond` and `microsecond`, if those form a valid `Time` (see `Time::isValid`); otherwise return an `optional` without a value. == Return Value optional containing a valid `Time`, or empty if invalid == Parameters [cols="1,4"] |=== | Name| Description | *hour* | hour of day | *minute* | minute of hour | *second* | second of minute | *millisecond* | optional millisecond | *microsecond* | optional microsecond |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#