Fix Feed.SecondsTilUpdate(). Last patch failed to convert stored time to seconds properly. Fixes issue #10.
This commit is contained in:
parent
057769eeb5
commit
6f6d1c9b3a
2
feed.go
2
feed.go
|
@ -170,7 +170,7 @@ func (this *Feed) CanUpdate() bool {
|
||||||
// before the feed should update.
|
// before the feed should update.
|
||||||
func (this *Feed) SecondsTillUpdate() int64 {
|
func (this *Feed) SecondsTillUpdate() int64 {
|
||||||
utc := time.Now().UTC()
|
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) {
|
func (this *Feed) buildFeed(doc *xmlx.Document) (err error) {
|
||||||
|
|
Loading…
Reference in New Issue