mirror of
https://github.com/rclone/rclone.git
synced 2025-08-14 15:58:26 +02:00
rc: fix output of Time values in options/get
Before this change these were output as `{}` after this change they are output as time strings `"2022-03-26T17:48:19Z"` in standard javascript format.
This commit is contained in:
@ -81,6 +81,11 @@ func (t *Time) UnmarshalJSON(in []byte) error {
|
||||
return t.Set(s)
|
||||
}
|
||||
|
||||
// MarshalJSON marshals as a time.Time value
|
||||
func (t Time) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(time.Time(t))
|
||||
}
|
||||
|
||||
// Scan implements the fmt.Scanner interface
|
||||
func (t *Time) Scan(s fmt.ScanState, ch rune) error {
|
||||
token, err := s.Token(true, func(rune) bool { return true })
|
||||
|
Reference in New Issue
Block a user