# [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>
RZ> >or, if you trust 'date',
RZ>
RZ> Only! ;-)
RZ>
RZ> >use this:
RZ>
RZ> >  # date +%s -d "Wed Jun  1 16:00:00 CEST 2005"
RZ> >  1117634400
RZ>
RZ> If i use the unix tool "date" i get
RZ>
RZ> msi:~/video/VDR#  date  -d  "1970-01-01 1117634400 sec"
RZ> Wed Jun  1 15:00:00 CEST 2005
RZ>
RZ> And on the other way:
RZ>
RZ> msi:~/video/VDR# date +%s -d "Wed Jun  1 16:00:00 CEST 2005"
RZ> 1117634400
RZ>
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
Sergei
--
--------------------------------------------------------------------  -?)
eMail:       Sergei.Haller at math.uni-giessen.de               /\\
-------------------------------------------------------------------- _\_V
Be careful of reading health books, you might die of a misprint.
-- Mark Twain

```