MCPcopy
hub / github.com/rclone/rclone / parseTimeString

Method parseTimeString

backend/b2/b2.go:1898–1909  ·  view source on GitHub ↗

parseTimeString converts a decimal string number of milliseconds elapsed since January 1, 1970 UTC into a time.Time and stores it in the modTime variable.

(timeString string)

Source from the content-addressed store, hash-verified

1896// elapsed since January 1, 1970 UTC into a time.Time and stores it in
1897// the modTime variable.
1898func (o *Object) parseTimeString(timeString string) (err error) {
1899 if timeString == "" {
1900 return nil
1901 }
1902 modTime, err := parseTimeStringHelper(timeString)
1903 if err != nil {
1904 fs.Debugf(o, "Failed to parse mod time string %q: %v", timeString, err)
1905 return nil
1906 }
1907 o.modTime = modTime
1908 return nil
1909}
1910
1911// ModTime returns the modification time of the object
1912//

Callers 2

decodeMetaDataRawMethod · 0.95
TestParseTimeStringFunction · 0.95

Calls 2

DebugfFunction · 0.92
parseTimeStringHelperFunction · 0.85

Tested by 1

TestParseTimeStringFunction · 0.76