Author | Message | Time |
---|---|---|
l2k-Shadow | For the record\game\0\last game key, the server sends back: [code] 9817155 3780018076 [/code] Starcraft outputs: 10/26/2006 14:15 for the time last game was played, does anyone know how to convert the value into that time? | February 24, 2007, 12:36 AM |
HdxBmx27 | It's jsut a Filetime structure like in 0x50. 1st is the Hi, 2nd is the low. I think, it might be the other way around. Same goes for Last Login, Account created, Last Logoff, etc... Its just cuz they send them as strings. ~Hdx | February 24, 2007, 12:42 AM |
l2k-Shadow | Oh that makes sense, I tried that prior to posting but made a coding mistake so I thought it could be something else since I was receiving crap results. thx. | February 24, 2007, 1:09 AM |
BreW | Uh... HDX how would you extract the date from the second filetime? The only one I (really) got so far, is the account logged. (it's in seconds). I already tried parsing the filetimes by using my system uptime function and it returned a far-off value. help :( | February 24, 2007, 2:59 AM |
l2k-Shadow | [quote author=brew link=topic=16387.msg165663#msg165663 date=1172285986] Uh... HDX how would you extract the date from the second filetime? The only one I (really) got so far, is the account logged. (it's in seconds). I already tried parsing the filetimes by using my system uptime function and it returned a far-off value. help :( [/quote] Put the data into a FILETIME struct then call FileTimeToSystemTime(FILETIME, SYSTEMTIME), look FileTimeToSystemTime up on MSDN. | February 24, 2007, 3:13 AM |
BreW | This will work for converting a filetime to a date too, correct? (the first filetime) | February 24, 2007, 4:05 AM |
l2k-Shadow | [quote author=brew link=topic=16387.msg165671#msg165671 date=1172289956] This will work for converting a filetime to a date too, correct? (the first filetime) [/quote] Look into the SYSTEMTIME struct, http://msdn2.microsoft.com/en-us/library/ms724950.aspx | February 24, 2007, 4:16 AM |
BreW | Ah. Thanks, shadow. | February 24, 2007, 4:35 AM |