// HTTP handler for /time. func Time(w http.ResponseWriter, r *http.Request) { now := time.Now() zone, offset := now.Zone() t := timestamp{ UTC: now.UTC(), Local: now.Local(), EPOCH: now.Unix(), Offset: float64(offset) / 60 / 60, Timezone: zone, } jsonxml.Write(w, r, t) }
// Status HTTP endpoint func Status(w http.ResponseWriter, r *http.Request) { jsonxml.Write(w, r, getStatuses(jobs...)) }