News:

*NEW* Current Version on STEAM16.793

Webchat:
Visit the chat



Time

Previous topic - Next topic

mikiex

Hi ,

I'm wondering, is the only way to get system time to use the dos command "time" then read this in to GLBasic. The big question is, can you do this on a pocket pc also?

Kitty Hello

oh. That's a problem. I have to add some command for that. Maybe via PLATFORMINFO ?

mikiex

Sounds like a good option :)

Kitty Hello

Wait a few seconds. Update 6.209 has the PLATFORMINFO$("TIME") which returns:
"2006-7-28 13:02:17" for *now*

mikiex

fantastic - just wait and see what Im going to do with it :)

mikiex

Hi Gernot,

Time seems to work fine, although I noticed that on my ppc it seems to be out by slow
by 1hr - im not at home to check my code, but im sure it was correct on PC....
Might be worth double checking on your ppc?

mmh I must remember to post my code snippet to extract the time :)
you made it a little tricky , but was fun to use the $ functions to get it out :)

Kitty Hello

Code (glbasic) Select
LOCAL time$[  ]
SPLITSTR(PLATFORMINFO$("TIME"), time$[], ":- ")

year = time$[0]
month = time$[1]
day = time$[2]
hour = time$[3]
minute = time$[4]
secoond = time$[5]
I'll have to check whether it's an hour off. What timezone do you have set on your PocketPC?

mikiex

My ppc is set to GMT (UK)
I would be 1hr behind you, so it might be something to do with this?

mikiex

hmhm even if I set my phone to german time, it is still 1hr slow :(