[vdr] Re: vdr 1.3.25 thread problems

Sergei Haller Sergei.Haller at math.uni-giessen.de
Wed Jun 1 17:16:11 CEST 2005

On Wed, 1 Jun 2005, Rainer Zocholl (RZ) wrote:

RZ> >  # ./time 1117634400
RZ> >  (time_t)     1117634400
RZ> >  (local time) Wed Jun  1 16:00:00 2005
RZ> >  (utc/gmt)    Wed Jun  1 14:00:00 2005
RZ> >or, if you trust 'date', 
RZ> Only! ;-)
RZ> >use this:
RZ> >  # date +%s -d "Wed Jun  1 16:00:00 CEST 2005"
RZ> >  1117634400
RZ> If i use the unix tool "date" i get 
RZ> msi:~/video/VDR#  date  -d  "1970-01-01 1117634400 sec"
RZ> Wed Jun  1 15:00:00 CEST 2005
RZ> And on the other way:
RZ> msi:~/video/VDR# date +%s -d "Wed Jun  1 16:00:00 CEST 2005"
RZ> 1117634400
RZ> Intessting, isn't it?

no. time_t is the number of seconds since 1970-01-01 in UTC. 
a time value as time_t is _unique_.

the call 
   date  -d  "1970-01-01 1117634400 sec"

is _not_ translation from time_t to human readable time.
you are kind of "cheating" telling date to recalculate the time 
"1970-01-01 00:00:1117634400" in whatever time zone it expectes it.

RZ> So for what ever reasons, VDR delivers "GMT" and not "localtime"!
RZ> Or does "date" make an error?

no, see above.

date, time, vdr: all compute the time_t values correctly. 

c ya
--------------------------------------------------------------------  -?)
         eMail:       Sergei.Haller at math.uni-giessen.de               /\\
-------------------------------------------------------------------- _\_V
Be careful of reading health books, you might die of a misprint.
                -- Mark Twain

More information about the vdr mailing list