Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 02/19/25 03:24
New Zorro version 2.64
by jcl. 02/17/25 15:32
Smaller Windows version
by Nicole. 02/08/25 14:51
Command Help in notepad++
by pr0logic. 02/07/25 18:19
How to export list of current open trades?
by vicknick. 02/07/25 17:22
Initial RithmicZorroPlugin Release.
by kzhao. 02/05/25 03:30
AUM Magazine
Latest Screens
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Zeal-X2
Who's Online Now
3 registered members (VoroneTZ, AndrewAMD, TipmyPip), 457 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
crazyhedgehog, Nicole, Columboss, quantenesis, YanniD
19109 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,767
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

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