Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 01/22/26 12:25
MRC.c and WFO
by 11honza11. 01/22/26 10:33
Buy A8 Pro Version
by Spirit. 01/21/26 21:37
Bar missing bug?
by jcl. 01/19/26 10:47
400 free seamless texture pack downl. here !
by NeoDumont. 01/18/26 19:09
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (TipmyPip, Angerbeer, qin, 1 invisible), 9,869 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Castromangos, Quantum, stephensdeborah, promfast, joe_kane
19193 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How does one store Unix timestamps in 32-bit lite-C? #488502
12/29/24 16:18
12/29/24 16:18
Joined: Dec 2024
Posts: 3
K
KrystianGalaj Offline OP
Guest
KrystianGalaj  Offline OP
Guest
K

Joined: Dec 2024
Posts: 3

The following code:

int Orig = 1733011199994;
DATE Date = mtu( Orig );
int Utm = utm( Date );

produces:

Original: 2139379706, Copy: 2139379706

but I see no way of coding it that would compile in lite-C. Especially as mtu() takes an int and utm() returns an int.

Inside dataParse, it works correctly and gives a correct DATE from the same timestamp ( which is 2024.11.30 23:59:59.994 ).

Re: How does one store Unix timestamps in 32-bit lite-C? [Re: KrystianGalaj] #488503
12/29/24 16:34
12/29/24 16:34
Joined: Dec 2024
Posts: 3
K
KrystianGalaj Offline OP
Guest
KrystianGalaj  Offline OP
Guest
K

Joined: Dec 2024
Posts: 3
I guess something like this works:

DATE Date = wdatef( "%t", "1733011199994" );

So UNIX timestamps can be stored in strings.

Re: How does one store Unix timestamps in 32-bit lite-C? [Re: KrystianGalaj] #488522
01/06/25 17:17
01/06/25 17:17
Joined: Feb 2017
Posts: 1,811
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,811
Chicago
You're asking about the millisecond variant of the unix timestamp. The maximum int value is 2147483647, which you have greatly exceeded.

Anyways, string works just fine in Lite-C.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1