[43684] in North American Network Operators' Group
Re: Unix Timestamp
daemon@ATHENA.MIT.EDU (Mike Wiacek)
Mon Oct 22 20:54:27 2001
Date: Mon, 22 Oct 2001 20:53:08 -0400 (EDT)
From: Mike Wiacek <mikew@magpage.com>
To: Brandon Handeland <Brandon@wyoming.com>
Cc: <nanog@merit.edu>
In-Reply-To: <5.1.0.14.2.20011022123839.05490760@calamity.wyoming.com>
Message-ID: <Pine.BSF.4.33.0110222050580.46671-100000@trinity.magpage.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Errors-To: owner-nanog-outgoing@merit.edu
If you are using perl, localtime()
If you are using C, strftime() uses a timezone
struct provided by the c function localtime().
strftime takes printf style arguments, and builds
strings that represent the time for you.
mike
--------------------------------------------------------
UNIX was not designed to stop you from doing stupid
things, because that would also stop you from doing
clever things. -- Doug Gwyn
Mike Wiacek
Systems Administrator
Magpage Internet Services
800-250-2990 Ext 226
On Mon, 22 Oct 2001, Brandon Handeland wrote:
>
> Does anyone have a formula to convert a unix time stamp into the current time?
>
> I know it is January 1st, 1970, in UTC format. Just need some example code.
>
> I'm trying to export some data from a HP/UX box into a MSSQL database and
> need to use the timestamp feature of MSSQL.
>
> Thanks
>
> ----------------------------------------------------------------------
> Brandon Handeland Brandon@wyoming.com
> Senior Network Engineer
> wyoming.com NOC (307) 857-1092
> ----------------------------------------------------------------------
>