Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Feb 1997 08:08:19 -0800
From:      Jason Fesler <jfesler@calweb.com>
To:        Ray Cummins <rcummins@burlco.lib.nj.us>, freebsd-questions@FreeBSD.org
Subject:   Re: time to seconds-since-epoch?
Message-ID:  <3.0.32.19970204080811.009aa2d0@pop.calweb.com>

next in thread | raw e-mail | index | archive | help
At 10:07 AM 2/4/97 -0500, Ray Cummins wrote:
>
>     Does anyone have a little program for FreeBSD that shows the current
>time in seconds from the epoch?

  /bin/date +%s

will return that info from the shell.

  #! /usr/bin/perl
  $epoch = $^T;    # sets $epoch to a likewise value - see man perlvar
                   # for details.  Note this is the time of the start of
                   # the script, not the current time.


With C,  "man 3 time" for details.


--
           Jason Fesler  jfesler@calweb.com  Internic: 'whois jf319'   
            Admin, CalWeb Internet Services   http://www.calweb.com
  Junk email returned, in bulk, back to sender; w/copies to all postmasters.
 You got junk mail problems?  Use Eudora Pro, MSIE's mail, or 'man procmail'.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.32.19970204080811.009aa2d0>