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
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								feed.go
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								feed.go
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -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) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue