Jan Engelhardt wrote: > $ date +%s > 1204311113 %s seconds since 1970-01-01 00:00:00 UTC
> $ TZ=GMT date +%s > 1204311113 > $ TZ=PDT date +%s > 1204311113 Right. I assume you were *very fast* typing in that data and that seconds did not move on while you were doing it. :-) I get the point though. That value is a timezone independent value. > but is there actually a way to do > > $ TZ=anything date +%s -d "`date '+%Y-%m-%d %H:%M:%S'`"; > > without invoking date twice? I think something was lost in translation. date '+%Y-%m-%d %H:%M:%S' That will always produce the current time. That means that date +%s -d "`date '+%Y-%m-%d %H:%M:%S'`" is always the same as date +%s There is no need to call date twice to get that result. Please say a few more words about what you are trying to do. I think with a little more understanding it will make better sense. I see that you are trying to produce a unix seconds epoch based upon some time but creating it with date doesn't do it. You would need some other time. date +%s -d 'last thursday' 1204182000 Bob _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils