Added some casts so that it works for negative values
This commit is contained in:
		
							parent
							
								
									1d73a4f04e
								
							
						
					
					
						commit
						d50d1f6c5e
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -16,8 +16,8 @@ gmtime(register const time_t *timer)
 | 
			
		|||
	register unsigned long dayclock, dayno;
 | 
			
		||||
	int year = EPOCH_YR;
 | 
			
		||||
 | 
			
		||||
	dayclock = time % SECS_DAY;
 | 
			
		||||
	dayno = time / SECS_DAY;
 | 
			
		||||
	dayclock = (unsigned long)time % SECS_DAY;
 | 
			
		||||
	dayno = (unsigned long)time / SECS_DAY;
 | 
			
		||||
 | 
			
		||||
	timep->tm_sec = dayclock % 60;
 | 
			
		||||
	timep->tm_min = (dayclock % 3600) / 60;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue