diff mbox

[06/13] libdvbv5: fix eit times

Message ID 1388245561-8751-6-git-send-email-neolynx@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

André Roth Dec. 28, 2013, 3:45 p.m. UTC
Signed-off-by: André Roth <neolynx@gmail.com>
---
 lib/libdvbv5/descriptors/eit.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Mauro Carvalho Chehab Dec. 29, 2013, 3:42 a.m. UTC | #1
Em Sat, 28 Dec 2013 16:45:54 +0100
André Roth <neolynx@gmail.com> escreveu:

> Signed-off-by: André Roth <neolynx@gmail.com>
> ---
>  lib/libdvbv5/descriptors/eit.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/libdvbv5/descriptors/eit.c b/lib/libdvbv5/descriptors/eit.c
> index d13b14c..e70cf3b 100644
> --- a/lib/libdvbv5/descriptors/eit.c
> +++ b/lib/libdvbv5/descriptors/eit.c
> @@ -155,9 +155,8 @@ void dvb_time(const uint8_t data[5], struct tm *tm)
>    tm->tm_mday  = day;
>    tm->tm_mon   = month - 1;
>    tm->tm_year  = year;
> -  tm->tm_isdst = -1;
> -  tm->tm_wday  = 0;
> -  tm->tm_yday  = 0;
> +  tm->tm_isdst = 1; // dst in effect, do not adjust

Please don't use c99 comments.

> +  mktime( tm );

Please remove the extra spaces.

>  }
>  
>
diff mbox

Patch

diff --git a/lib/libdvbv5/descriptors/eit.c b/lib/libdvbv5/descriptors/eit.c
index d13b14c..e70cf3b 100644
--- a/lib/libdvbv5/descriptors/eit.c
+++ b/lib/libdvbv5/descriptors/eit.c
@@ -155,9 +155,8 @@  void dvb_time(const uint8_t data[5], struct tm *tm)
   tm->tm_mday  = day;
   tm->tm_mon   = month - 1;
   tm->tm_year  = year;
-  tm->tm_isdst = -1;
-  tm->tm_wday  = 0;
-  tm->tm_yday  = 0;
+  tm->tm_isdst = 1; // dst in effect, do not adjust
+  mktime( tm );
 }