delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/07/05/07:13:39

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <BAY104-DAV8AEDA82E7ECB12DB035B387020@phx.gbl>
X-Originating-IP: [80.25.207.120]
X-Originating-Email: [a_aniento AT hotmail DOT com]
X-Sender: a_aniento AT hotmail DOT com
From: "Antoni Aniento Recasens" <a_aniento AT hotmail DOT com>
To: <djgpp AT delorie DOT com>
Subject: question about mktime
Date: Thu, 5 Jul 2007 12:58:56 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-OriginalArrivalTime: 05 Jul 2007 10:58:52.0162 (UTC) FILETIME=[791CF620:01C7BEF3]
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.

------=_NextPart_000_0080_01C7BF04.3F5C0C80
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0081_01C7BF04.3F5C0C80"


------=_NextPart_001_0081_01C7BF04.3F5C0C80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


----- Original Message -----=20
From: Antoni Aniento Recasens=20
To: listserv AT delorie DOT com=20
Sent: Thursday, July 05, 2007 12:55 PM
Subject: question about mktime


Dear DJGPP's!

I'm new in this list. I've a question to you.

I've trying to compile the attached source file test2.c with DJGPP. In =
my laptop the result of mktime is always -1, while in the  public access =
compiler (http://www.delorie.com/djgpp/compile/) the result is =
1175601600 (corresponts to 3-march-2007 12:00).
I suppose the problem should come from the installation, but I don't =
know where.

Could you give me any help!

Many thanks in advance. Best regards...

    Toni Aniento
------=_NextPart_001_0081_01C7BF04.3F5C0C80
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16481" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
title=3Da_aniento AT hotmail DOT com =
href=3D"mailto:a_aniento AT hotmail DOT com">Antoni Aniento=20
Recasens</A> </DIV>
<DIV><B>To:</B> <A title=3Dlistserv AT delorie DOT com=20
href=3D"mailto:listserv AT delorie DOT com">listserv AT delorie DOT com</A> </DIV>
<DIV><B>Sent:</B> Thursday, July 05, 2007 12:55 PM</DIV>
<DIV><B>Subject:</B> question about mktime</DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>Dear DJGPP's!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm new in this list. I've a question =
to=20
you.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT face=3DArial size=3D2>I've trying to compile the attached =
source file=20
test2.c with DJGPP.&nbsp;In my laptop the result of mktime is always -1, =
while=20
in the &nbsp;public access compiler (<A=20
href=3D"http://www.delorie.com/djgpp/compile/">http://www.delorie.com/djg=
pp/compile/</A>)=20
the result is 1175601600 (corresponts to 3-march-2007 =
12:00).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I suppose the problem should come from =
the=20
installation, but I don't know where.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Could you give me any =
help!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Many thanks in advance. </FONT><FONT =
face=3DArial=20
size=3D2>Best regards...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Toni=20
Aniento</FONT></DIV></DIV></BODY></HTML>

------=_NextPart_001_0081_01C7BF04.3F5C0C80--

------=_NextPart_000_0080_01C7BF04.3F5C0C80
Content-Type: application/octet-stream;
	name="test2.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="test2.c"

#include <stdio.h>
#include <time.h>

main()
{
  time_t segundos;
  struct tm camposHora;
  camposHora.tm_mday =3D 3;
  camposHora.tm_mon =3D 3;
  camposHora.tm_year =3D 107;
  camposHora.tm_hour =3D 12;
  camposHora.tm_min =3D 0;
  camposHora.tm_sec =3D 0;
  segundos =3D mktime(&camposHora);
  printf("min=3D%d hora=3D%d dia=3D%d mes=3D%d any=3D%d =
total=3D%d\n",camposHora.tm_min,camposHora.tm_hour,camposHora.tm_mday,cam=
posHora.tm_mon,camposHora.tm_year,segundos);
}

------=_NextPart_000_0080_01C7BF04.3F5C0C80--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019