Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/08/26 18:50
zorro with ccxt?
by opm. 03/03/26 03:17
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Aku_Aku, 1 invisible), 15,822 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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,813
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,813
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