Fix Feed.SecondsTilUpdate(). Last patch failed to convert stored time to seconds properly. Fixes issue #10.

This commit is contained in:
jim teeuwen 2012-03-13 16:46:42 +01:00
parent 057769eeb5
commit 6f6d1c9b3a
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ func (this *Feed) CanUpdate() bool {
// before the feed should update.
func (this *Feed) SecondsTillUpdate() int64 {
utc := time.Now().UTC()
return int64(this.CacheTimeout*60) - (utc.Unix() - this.lastupdate)
return int64(this.CacheTimeout*60) - (utc.Unix() - (this.lastupdate / 1e9))
}
func (this *Feed) buildFeed(doc *xmlx.Document) (err error) {