nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nmh-workers] Reproducible build patch


From: Leonardo Taccari
Subject: Re: [nmh-workers] Reproducible build patch
Date: Tue, 24 Jul 2018 00:12:44 +0200

Hello valdis, Ken and nmh-workers@,

address@hidden writes:
> [...]
> Also, the "date +s" and the "date -u -r" don't do what you think they do...
> [...]

I think that `date +s' is a typo - probably missing a `%' as you've
noticed - while `date -u -r' (that's after the `||') should work on
most BSD systems.

> [...]
> I'm assuming that the BSD 'date'  takes -r as a timestamp rather than a 
> filename.  Somebody
> on a BSD system will need to check that.

This is what happens on NetBSD (if I'm not missing something the
it is similar to what happens with GNU date):

 | % cat /tmp/date.sh
 | DATE_FMT="%Y-%m-%d %T +0000"
 | SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
 | date=$(TZ=GMT0 date --date="@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || 
date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u 
"+$DATE_FMT")
 | echo $date
 | % date && sh -x date.sh
 | Mon Jul 23 23:57:26 CEST 2018
 | + DATE_FMT='%Y-%m-%d %T +0000'
 | + date '+%s'
 | + SOURCE_DATE_EPOCH=1532383046
 | + TZ=GMT0 date 'address@hidden' '+%Y-%m-%d %T +0000' 2>/dev/null
 | + date -u -r 1532383046 '+%Y-%m-%d %T +0000' 2>/dev/null
 | + date='2018-07-23 21:57:26 +0000'
 | + echo 2018-07-23 '21:57:26' +0000
 | 2018-07-23 21:57:26 +0000



reply via email to

[Prev in Thread] Current Thread [Next in Thread]