Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!know!pluto.hemel.bull.co.uk!ewoods From: ewoods@hemel.bull.co.uk (Eoin Woods) Newsgroups: comp.unix.questions Subject: Re: need "yy-ddd-hh:mm:ss ==> (time_t) clock" converter Message-ID: <1991Jan25.081618.19366@hemel.bull.co.uk> Date: 25 Jan 91 08:16:18 GMT References: <25690@adm.brl.mil> Sender: @hemel.bull.co.uk Organization: Bull HN UK Lines: 24 Nntp-Posting-Host: brno lgdelta!email!tachost!BRL.MIL!Info-Unix-Request@tachost.af.mil (The Moderator) writes: >Help! I need something to convert yy-ddd-hh:mm:ss (i.e. year, >day_of_year, hour, minute, second) to a unix-style >_number_of_seconds_since_00:00:00_GMT,_Jan._1,_1970_. Take a look at the book "Advanced UNIX Programming" by Marc Rochkind (Prentice Hall, 1985, ISBN 0-13-011818-[41]) He discusses UNIX's handling of dates and times in section 3.4 and presents a function timecvt() that takes a string of the form YYMMDDhhmmss and converts it to "seconds since the epoch" form (page 50-52). (Its a generally "classic" book anyway!) Eoin. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Eoin Woods, Software Development Group, Bull HN Information Systems, ~ ~ Maxted Road, Hemel Hempstead, Herts HP2 7DZ, UK. ~ ~ Tel : +44 442 232222 x4823 Fax : +44 442 234084 ~ ~ < Eoin.Woods@hemel.bull.co.uk or ...!uunet!ukc!brno!ewoods> ~ ~ < When do we start news group comp.os.emacs ? :-) > ~