Projects / Epoch2Time / Comments

RSS Comments for Epoch2Time

31 Oct 2007 06:27 nocturn

Re: Ummm, how does this differ from GNU date?
Older versions of date do not support -d (Tested on my Debian Sarge production systems).

24 Aug 2007 00:49 nocturn

Re: Epoc 2 date

> Or, on a recent distro

> (date --version

> date (GNU coreutils) 6.9)

>

> date -d @1177030963

>

>

>

> /me shrugs

>

>

>

>

Works fine (didn't know about that option), though man date doesn't seem to mention it.

24 Aug 2007 00:43 nocturn

Re: Ummm, how does this differ from GNU date?

>

> I have to wonder, given the package's

> description, what this does that one

> can't simply accomplish with the

> following single line of shell

> scripting:

>

> date -d "$(( $(date +%s) -

> $EPOCH )) seconds ago"

> +"$DESIRED_DATE_FORMAT"

>

> Which the stock GNU date command, from

> coreutils, handles just fine (including

> for epoch values in the future, which

> naturally generate a negative number of

> "seconds ago" --- odd looking

> to a human, but reasonably handled by

> the software nonetheless).

>

> JimD

>

>

I didn't know about date -d @

It does nothing more then that.

22 Aug 2007 13:46 Tinkster

Epoc 2 date
Or, on a recent distro

(date --version

date (GNU coreutils) 6.9)

date -d @1177030963

/me shrugs

22 Aug 2007 13:02 answerguy

Ummm, how does this differ from GNU date?

I have to wonder, given the package's description, what this does that one can't simply accomplish with the following single line of shell scripting:

date -d "$(( $(date +%s) - $EPOCH )) seconds ago" +"$DESIRED_DATE_FORMAT"

Which the stock GNU date command, from coreutils, handles just fine (including for epoch values in the future, which naturally generate a negative number of "seconds ago" --- odd looking to a human, but reasonably handled by the software nonetheless).

JimD

Screenshot

Project Spotlight

statsmodels

Statistical computations and models for use with SciPy.

Screenshot

Project Spotlight

Credit Analytics

A financial fixed-income credit analytics, credit risk, bond analytics, and bond risk library.