Thread

Format of TimeStamp field (Sdk)

Format of TimeStamp field // Sdk

1  |  

lucio pascarelli

Dec 1, 1998, 6:52pm
Can anybody help decode the field into a standard date/time format ?

LP

edward sumerfield

Dec 1, 1998, 7:05pm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
What timestamp field?
<P>If you are referring to the standard C time_t which is actually just
an int then take a look at the localtime function. It returns you the following
structure.
<P>struct tm
<BR>{
<BR>&nbsp; int tm_sec;
<BR>&nbsp; int tm_min;
<BR>&nbsp; int tm_hour;
<BR>&nbsp; int tm_mday;
<BR>&nbsp; int tm_mon;
<BR>&nbsp; int tm_year;
<BR>&nbsp; int tm_wday;
<BR>&nbsp; int tm_yday;
<BR>&nbsp; int tm_isdst;
<BR>};
<P>Edward Sumerfield.
[View Quote]

lucio pascarelli

Dec 1, 1998, 7:26pm
This is a multi-part message in MIME format.

------=_NextPart_000_002F_01BE1D79.B430D4E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

sorry, I was unclear.

I am referring to the AW_OBJECT_BUILD_TIMESTAMP attribute returned by =
the AW_QUERY. It is a long integer which I am trying to decode into a =
Time field for a database :)

Luco
[View Quote] struct tm=20
{=20
int tm_sec;=20
int tm_min;=20
int tm_hour;=20
int tm_mday;=20
int tm_mon;=20
int tm_year;=20
int tm_wday;=20
int tm_yday;=20
int tm_isdst;=20
};=20

Edward Sumerfield.=20

[View Quote] Can anybody help decode the field into a standard date/time =
format ?=20
LP


------=_NextPart_000_002F_01BE1D79.B430D4E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 =
Transitional//EN">
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>sorry, I was unclear.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>I am referring to the =
AW_OBJECT_BUILD_TIMESTAMP=20
attribute returned by the AW_QUERY. It is a long integer which I am =
trying to=20
decode into a Time field for a database :)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Luco</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] =
href=3D"mailto:36645A37.2C3C65B0 at poboxes.com">36645A37.2C3C65B0 at poboxes.c=
om</A>&gt;...</DIV>What=20
timestamp field?=20
<P>If you are referring to the standard C time_t which is actually =
just an=20
int then take a look at the localtime function. It returns you the =
following=20
structure.=20
<P>struct tm <BR>{ <BR>&nbsp; int tm_sec; <BR>&nbsp; int tm_min; =
<BR>&nbsp;=20
int tm_hour; <BR>&nbsp; int tm_mday; <BR>&nbsp; int tm_mon; =
<BR>&nbsp; int=20
tm_year; <BR>&nbsp; int tm_wday; <BR>&nbsp; int tm_yday; <BR>&nbsp; =
int=20
tm_isdst; <BR>};=20
<P>Edward Sumerfield.=20
[View Quote] ------=_NextPart_000_002F_01BE1D79.B430D4E0--

lucio pascarelli

Dec 1, 1998, 7:36pm
Thanks :)
[View Quote] Lucio Pascarelli <lucio at pascarelli.com> wrote in article
<36646015.0 at homer>...
sorry, I was unclear.

I am referring to the AW_OBJECT_BUILD_TIMESTAMP attribute returned by the
AW_QUERY. It is a long integer which I am trying to decode into a Time
field for a database :)

Luco
[View Quote] struct tm


int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};

Edward Sumerfield.

[View Quote] Can anybody help decode the field into a standard date/time format
?
LP


----------

ima genius

Dec 1, 1998, 7:38pm
Thats in seconds since 1970 :)
- Ima

Lucio Pascarelli <lucio at pascarelli.com> wrote in article
<36646015.0 at homer>...
sorry, I was unclear.

I am referring to the AW_OBJECT_BUILD_TIMESTAMP attribute returned by the
AW_QUERY. It is a long integer which I am trying to decode into a Time
field for a database :)

Luco
[View Quote] struct tm
{
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};

Edward Sumerfield.

[View Quote] Can anybody help decode the field into a standard date/time format
?
LP


----------

veleno

Dec 1, 1998, 7:41pm
I have a recent question on something of this. In a thread farther up I
was asking about the time(). I got the example given to run, but when I
tried to get the bot to timestamp the console window when someone came
in, everytime someone entered, it would just crash with a core dump. I
can post the contents of the dump if it's necissary... any reason why
this doesn't work?

[View Quote] > What timestamp field?
>
> If you are referring to the standard C time_t which is actually just
> an int then take a look at the localtime function. It returns you the
> following structure.
>
> struct tm
> {
> int tm_sec;
> int tm_min;
> int tm_hour;
> int tm_mday;
> int tm_mon;
> int tm_year;
> int tm_wday;
> int tm_yday;
> int tm_isdst;
> };
>
> Edward Sumerfield.
>
[View Quote]

edward sumerfield

Dec 2, 1998, 3:05am
The standard C time is also an int, typedef'ed to time_t, that is a number of
seconds since some base date. Is that not 1970 aswell? I seem to remember that
1970 was the unix base time.

Edward Sumerfield

[View Quote] > Thats in seconds since 1970 :)
> - Ima
>
> Lucio Pascarelli <lucio at pascarelli.com> wrote in article
> <36646015.0 at homer>...
> sorry, I was unclear.
>
> I am referring to the AW_OBJECT_BUILD_TIMESTAMP attribute returned by the
> AW_QUERY. It is a long integer which I am trying to decode into a Time
> field for a database :)
>
> Luco
[View Quote]

edward sumerfield

Dec 2, 1998, 3:09am
Try and find out on which line the program crashes. Either by adding printf
statements until you narrow it down or by using the debugger and stepping
through until it crashes.

You describe a problem that may have nothing to do with a time function.

[View Quote] > I have a recent question on something of this. In a thread farther up I
> was asking about the time(). I got the example given to run, but when I
> tried to get the bot to timestamp the console window when someone came
> in, everytime someone entered, it would just crash with a core dump. I
> can post the contents of the dump if it's necissary... any reason why
> this doesn't work?
>
[View Quote]

veleno

Dec 3, 1998, 12:16am
well, the program works just fine without the timestamp coding. then once I add
it and it is activated (ie, by the user entering the world) then the bot
crashes. So, I would think it obviously has something to do with the timestamp.
Nothing else in the program was altered aside from adding that coding.

[View Quote] > Try and find out on which line the program crashes. Either by adding printf
> statements until you narrow it down or by using the debugger and stepping
> through until it crashes.
>
> You describe a problem that may have nothing to do with a time function.
>
[View Quote]

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2022. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn