MCPcopy Create free account
hub / github.com/dropbox/dbxcli / formatTime

Function formatTime

cmd/format.go:35–44  ·  view source on GitHub ↗
(t time.Time, opts listOptions)

Source from the content-addressed store, hash-verified

33}
34
35func formatTime(t time.Time, opts listOptions) string {
36 switch opts.timeFormat {
37 case "short":
38 return t.Format("2006-01-02 15:04")
39 case "rfc3339":
40 return t.Format(time.RFC3339)
41 default:
42 return humanize.Time(t)
43 }
44}
45
46func getTime(e *files.FileMetadata, opts listOptions) time.Time {
47 if opts.timeField == "client" {

Callers 4

TestFormatTimeDefaultFunction · 0.85
TestFormatTimeShortFunction · 0.85
TestFormatTimeRFC3339Function · 0.85

Calls

no outgoing calls

Tested by 3

TestFormatTimeDefaultFunction · 0.68
TestFormatTimeShortFunction · 0.68
TestFormatTimeRFC3339Function · 0.68