brahms@spp5.UUCP (07/18/86)
Could someone please either post or send me the formula (in c hopefully) for changing a tm struct back into the number of seconds since 00:00:00, GMT, Jan 1, 1970? Thanx. -- Brad Brahms usenet: {decvax,ucbvax,ihnp4}!trwrb!trwspp!brahms arpa: Brahms@usc-eclc
guy@sun.uucp (Guy Harris) (07/21/86)
> Could someone please either post or send me the formula (in c hopefully) > for changing a tm struct back into the number of seconds since 00:00:00, > GMT, Jan 1, 1970? Thanx. I presume you have UNIX source available; if so, try looking at the "date" command, which converts times specified in roughly the same form into UNIX times. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)
rlk@chinet.UUCP (Richard Klappal) (07/23/86)
In article <123@spp5.UUCP> brahms@spp5.UUCP (Bradley S. Brahms) writes: >Could someone please either post or send me the formula (in c hopefully) >for changing a tm struct back into the number of seconds since 00:00:00, >GMT, Jan 1, 1970? Thanx. Marc Rochkind's book on advanced un*x programming has a 2 page+/- routine to convert a date (yymmddhhmmss) into seconds. The mods to handle the tm_ struct would be trivial. -- --- UUCP: ..!ihnp4!chinet!uklpl!rlk || MCIMail: rklappal || Compuserve: 74106,1021 ..!ihnp4!ihu1h!rlk ---