[43673] in North American Network Operators' Group
Re: Unix Timestamp
daemon@ATHENA.MIT.EDU (Robert E. Seastrom)
Mon Oct 22 15:45:07 2001
To: Brandon Handeland <Brandon@wyoming.com>
Cc: nanog@merit.edu
From: rs@seastrom.com (Robert E. Seastrom)
Date: 22 Oct 2001 14:57:34 -0400
In-Reply-To: Brandon Handeland's message of "Mon, 22 Oct 2001 12:38:43 -0600"
Message-ID: <87elnvtsdd.fsf@valhalla.seastrom.com>
Errors-To: owner-nanog-outgoing@merit.edu
Brandon Handeland <Brandon@wyoming.com> writes:
> 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.
The best code I've seen for this (and which knows about most variants
of the timestamp seen in the wild) was written by Steve Bellovin et
al, and can be found in the inn distribution in lib/parsedate.y
---Rob