timeWithSeconds(timestamp = now()) formats a timestamp as
HH:MM:SS, zero-padded. For HH:MM (no seconds) use time from the
same module. Part of pota/use/time.
| Argument | Type | Description |
|---|---|---|
timestamp |
number |
Unix milliseconds. Defaults to now(). |
Returns: a string like '09:05:42'.
Renders the wall-clock time including seconds.
import { render } from 'pota'
import { timeWithSeconds } from 'pota/use/time'
function App() {
return <p>now: {timeWithSeconds()}</p>
}
render(App)