gin icon indicating copy to clipboard operation
gin copied to clipboard

Incorrect time calcs in scanChanges

Open ernestoalejo opened this issue 11 years ago • 0 comments

I'm using Vagrant, and it frequently has a lot of problems keeping the correct time. This means sometimes I modify a file at 16:16 when time.Now() keeps saying it's 16:12 (and it compiles the app all the time).

This could be easily fixed replacing in this line: https://github.com/codegangsta/gin/blob/master/main.go#L161

the code: startTime = time.Now()

by: startTime = info.ModTime()

I think it doesn't change the functionality at all but it fixes problems when using different clocks.

ernestoalejo avatar Aug 05 '14 14:08 ernestoalejo