MCPcopy Create free account
hub / github.com/freecodexyz/free-code / formatLocalTime

Function formatLocalTime

src/utils/cron.ts:200–205  ·  view source on GitHub ↗
(minute: number, hour: number)

Source from the content-addressed store, hash-verified

198]
199
200function formatLocalTime(minute: number, hour: number): string {
201 // January 1 — no DST gap anywhere. Using `new Date()` (today) would roll
202 // 2am→3am on the one spring-forward day per year.
203 const d = new Date(2000, 0, 1, hour, minute)
204 return d.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' })
205}
206
207function formatUtcTimeAsLocal(minute: number, hour: number): string {
208 // Create a date in UTC and format in user's local timezone

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected