Skip to content

Commit 95a582c

Browse files
committed
convert utc times to a time obj too!
1 parent 9ff2bc7 commit 95a582c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

internal/track/track.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ func StringToTrack(line []string, offset float64) (lastfm.ScrobbleParams, error)
5353
date them with the current local time */
5454
if timestampRaw == TIMESTAMP_NO_RTC {
5555
timestamp = time.Now().UTC()
56-
}
57-
58-
/* Time conversion - the API wants it in UTC timezone */
59-
if offset != 0 {
56+
} else {
57+
/* Convert from unix epoch to time obj */
6058
timestamp, err = convertTimeStamp(timestampRaw, offset)
6159
}
6260

0 commit comments

Comments
 (0)