[EMAIL PROTECTED] <[EMAIL PROTECTED]> [2002-09-20 13:44:43 
-0400]:
> I use the todate program to manipulate the date fields that I have in one
> of my files. I'm using the %s format string which formats the date to
> seconds elapsed since Jan 1 1970. Is there any way in which I can convert
> the seconds back to an actual date?

I am in timezone MDT.

  date +%s
  1032724962

  date -d '1970-01-01 UTC 1032724962 sec'
  Sun Sep 22 14:02:42 MDT 2002

Also, in perl.

  perl -le 'print ($s = localtime(1032724962));'
  Sun Sep 22 14:02:42 2002

Bob


_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils

Reply via email to