mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed handling VPS times at year boundaries
This commit is contained in:
		
							
								
								
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							@@ -2727,3 +2727,4 @@ Video Disk Recorder Revision History
 | 
			
		||||
  the running status).
 | 
			
		||||
- Fixed handling "itemized" texts in EPG data (thanks to St<53>phane Est<73>-Gracias
 | 
			
		||||
  for pointing out this problem, and Marcel Wiesweg for improving 'libsi').
 | 
			
		||||
- Fixed handling VPS times at year boundaries.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								eit.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								eit.c
									
									
									
									
									
								
							@@ -8,7 +8,7 @@
 | 
			
		||||
 * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
 | 
			
		||||
 * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: eit.c 1.91 2004/03/07 10:36:57 kls Exp $
 | 
			
		||||
 * $Id: eit.c 1.92 2004/03/07 11:51:57 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "eit.h"
 | 
			
		||||
@@ -126,11 +126,16 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
 | 
			
		||||
                 struct tm tm_r;
 | 
			
		||||
                 struct tm t = *localtime_r(&now, &tm_r); // this initializes the time zone in 't'
 | 
			
		||||
                 t.tm_isdst = -1; // makes sure mktime() will determine the correct DST setting
 | 
			
		||||
                 int month = t.tm_mon;
 | 
			
		||||
                 t.tm_mon = pd->getMonth() - 1;
 | 
			
		||||
                 t.tm_mday = pd->getDay();
 | 
			
		||||
                 t.tm_hour = pd->getHour();
 | 
			
		||||
                 t.tm_min = pd->getMinute();
 | 
			
		||||
                 t.tm_sec = 0;
 | 
			
		||||
                 if (month == 11 && t.tm_mon == 0) // current month is dec, but event is in jan
 | 
			
		||||
                    t.tm_year++;
 | 
			
		||||
                 else if (month == 0 && t.tm_mon == 11) // current month is jan, but event is in dec
 | 
			
		||||
                    t.tm_year--;
 | 
			
		||||
                 time_t vps = mktime(&t);
 | 
			
		||||
                 pEvent->SetVps(vps);
 | 
			
		||||
                 }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user