MCPcopy Index your code
hub / github.com/rclone/rclone / parseTimeStringHelper

Function parseTimeStringHelper

backend/b2/b2.go:1887–1893  ·  view source on GitHub ↗

parseTimeStringHelper converts a decimal string number of milliseconds elapsed since January 1, 1970 UTC into a time.Time

(timeString string)

Source from the content-addressed store, hash-verified

1885// parseTimeStringHelper converts a decimal string number of milliseconds
1886// elapsed since January 1, 1970 UTC into a time.Time
1887func parseTimeStringHelper(timeString string) (time.Time, error) {
1888 unixMilliseconds, err := strconv.ParseInt(timeString, 10, 64)
1889 if err != nil {
1890 return time.Time{}, err
1891 }
1892 return time.Unix(unixMilliseconds/1e3, (unixMilliseconds%1e3)*1e6).UTC(), nil
1893}
1894
1895// parseTimeString converts a decimal string number of milliseconds
1896// elapsed since January 1, 1970 UTC into a time.Time and stores it in

Callers 1

parseTimeStringMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…