GLBasic forum

Main forum => GLBasic - en => Topic started by: mikiex on 2006-Jul-27

Title: Time
Post by: mikiex on 2006-Jul-27
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?
Title: Time
Post by: Kitty Hello on 2006-Jul-27
oh. That's a problem. I have to add some command for that. Maybe via PLATFORMINFO ?
Title: Time
Post by: mikiex on 2006-Jul-27
Sounds like a good option :)
Title: Time
Post by: Kitty Hello on 2006-Jul-28
Wait a few seconds. Update 6.209 has the PLATFORMINFO$("TIME") which returns:
"2006-7-28 13:02:17" for *now*
Title: Time
Post by: mikiex on 2006-Jul-28
fantastic - just wait and see what Im going to do with it :)
Title: Time
Post by: mikiex on 2006-Aug-01
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 :)
Title: Time
Post by: Kitty Hello on 2006-Aug-01
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?
Title: Time
Post by: mikiex on 2006-Aug-01
My ppc is set to GMT (UK)
I would be 1hr behind you, so it might be something to do with this?
Title: Time
Post by: mikiex on 2006-Aug-01
hmhm even if I set my phone to german time, it is still 1hr slow :(