bug-coreutils
[Top][All Lists]
Advanced

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

Re: date +%s ignores TZ


From: Brian Dessent
Subject: Re: date +%s ignores TZ
Date: Fri, 29 Feb 2008 14:18:18 -0800

Jan Engelhardt wrote:

> I wanted to get the number of seconds since the start of the day.
> 
>         echo $[`date +%s` % 86400];

How about:

echo $[$(date +%s) - $(date -d '' +%s)]

Brian




reply via email to

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