Sergei.Haller@xxxxxxxxxxxxxxxxxxx(Sergei Haller) 01.06.05 16:22 >On Wed, 1 Jun 2005, Rainer Zocholl (RZ) wrote: RZ>> RZ>> that is time RZ>> msi:~/video# date -d "1970-01-01 1117634400 sec" RZ>> Wed Jun 1 15:00:00 CEST 2005 RZ>> RZ>> the timer is: RZ>> msi:~/video# grep Yourself /video0/timers.conf RZ>> 1:T-8468-8705-16403:MTWTF--:1600:1701:50:3:Do It Yourself - RZ>> S.O.S.: RZ>> RZ>> RZ>> RZ>> Jun 1 15:15:56 msi vdr[5722]: executing '/video0/pwroff RZ>> 1117634400 2644 88 "Do It Yourself - S.O.S." 0' RZ>> Jun 1 15:15:56 msi pwroff: VDR shutdown 1:1117634400 2:2644 3:88 RZ>> 4:Do It Yourself - S.O.S. 5:0 A:1117634400 2644 88 Do It Yourself RZ>> - S.O.S. 0 Jun 1 15:15:57 msi pwroff: wrong wakeup time RZ>> 1117634400! RZ>> RZ>> RZ>> It seems that VDR finds the right timer, but calcutes the time RZ>> in second wrong! >the calculated time IS correct. you can use the small tool 'time' from >nvram-wakeup package: > # ./time 1117634400 > (time_t) 1117634400 > (local time) Wed Jun 1 16:00:00 2005 > (utc/gmt) Wed Jun 1 14:00:00 2005 >or, if you trust 'date', Only! ;-) >use this: > # date +%s -d "Wed Jun 1 16:00:00 CEST 2005" > 1117634400 If i use the unix tool "date" i get msi:~/video/VDR# date -d "1970-01-01 1117634400 sec" Wed Jun 1 15:00:00 CEST 2005 And on the other way: msi:~/video/VDR# date +%s -d "Wed Jun 1 16:00:00 CEST 2005" 1117634400 Intessting, isn't it? But: msi:~/video/VDR# date -d "1970-01-01 1117634400 sec GMT" Wed Jun 1 16:00:00 CEST 2005 Funny? So for what ever reasons, VDR delivers "GMT" and not "localtime"! Or does "date" make an error? Where is the 1h(!) offest from? We have Summertime (OK, curently only in the computer, not ouside) that's "GMT+2h" At least adding "GMT" would be a workarround, thanks to the hint. Anyway: The functions TimeToString, DateToString are not cleanly implemented! One should never return a pointer to local stack back the calling(!) programm. It causes very very very mean hard to detect very ugly errors. One effect: Using compiler A all is well, compiled with B does not work relyable. Using in ten calls type a works, using in an other contens does not work. And of cause, with preemtive multitasks there are more problems. Rainer