🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #840

como obtener la hora de mi sistema en C

#840
From: teoria
Date: Sun, 03 Sep 2006 19:03
8 lines
1589 bytes
Hola señores. Estoy haciendo un programa en C y necesito imprimir en
pantalla la hora y fecha de cuando el sistema fue iniciado. Hay alguna
función que me retorne eso?
Tambien necesito imprimir la hora actual en pantalla.
Se me ocurrió que si tenia la hora actual, restandole los segundos de
cuando fue iniciado el sistema, podia obtener la hora de cuando se
inicio el sistema. Pero no me sale. Necesito ayuda!
Saludos!
Technical Details
Message-ID: <1157310184.626614.191070@m79g2000cwm.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!m79g2000cwm.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,5b586e9804fa2254,start
X-Google-Attributes: gidf86c8,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!m79g2000cwm.googlegroups.com!not-for-mail
From: "teoria" <teoriaderedes@gmail.com>
Newsgroups: es.comp.os.linux.programacion
Subject: como obtener la hora de mi sistema en C
Date: 3 Sep 2006 12:03:04 -0700
Organization: http://groups.google.com
Lines: 9
Message-ID: <1157310184.626614.191070@m79g2000cwm.googlegroups.com>
NNTP-Posting-Host: 200.45.218.38
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1157310188 9150 127.0.0.1 (3 Sep 2006 19:03:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 3 Sep 2006 19:03:08 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: m79g2000cwm.googlegroups.com; posting-host=200.45.218.38;
   posting-account=PVAo_A0AAAD1Q9tbQD_Eca7B-sYTGqC0