• Welcome to Valhalla Legends Archive.
 

Profile Stuff..

Started by Gandalf, February 07, 2004, 09:48 PM

Previous topic - Next topic

Gandalf

And what about the Created Account date, it shows: "29475313 2842110102" What i have to do to show me the normal date?

Newby

Create a sub to parse it.
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

UserLoser.

It's a filetime, one part is lowdatetime, other is highdate time... Look into the SYSTEMTIME and FILETIME structs, along with FileTimeToSystemTime()

Gandalf

Whats wrong with this:
Private Function ReturnDHMS(iSec1 As Single) As String
   
   Dim iMin As Single
   Dim iHrs As Single
   Dim iDay As Single
   Dim iSec As Single
   
   iSec = iSec1
   
   iHrs = (iMin \ 60)
   iMin = (iSec \ 60)
   iSec = (iSec Mod 60)
   
   If iHrs >= 24 Then
       iDay = iHrs \ 24
       iHrs = iHrs Mod 24
   End If
   
   ReturnDHMS = "Day:" & Str(iDay) & "  Hrs:" & Str(iHrs) & "  Min: " & Str(iMin) & "  Sec: " & Str(iSec)
   
End Function

Lenny

#4
Well the other profile keys are sent as unsigned dwords in the form of Filetimes...not seconds


Bnet sends you it in
HIGHdate
LOWdate
order.

You need to also convert it using FileTimeToLocalFileTime() before using FileTimeToSystemTime()
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

UserLoser.

Quote from: Lenny on February 07, 2004, 10:21 PM
You need to also convert it using FileTimeToLocalFileTime() before using FileTimeToSystemTime()

That's not true

Lenny

Well I assume most people would want the local time they created the account, not the time a bnet server recorded it.....
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

Spht

Quote from: Lenny on February 07, 2004, 10:50 PM
Well I assume most people would want the local time they created the account, not the time a bnet server recorded it.....

If you sent Battle.net proper location information, it'll return the time in your timezone.

Eric

QuoteIf you sent Battle.net proper location information, it'll return the time in your timezone.

That's not true for profile keys.

UserLoser.

TimeZone is either sent in the 7th DWORD of 0x50 (SID_AUTH_INFO), or the 5th DWORD of 0x12 (SID_LOCALEINFO)...

Correct information to send is the Bias + StandardBias from TIME_ZONE_INFORMATION struct, which can be retrieved using GetTimeZoneInformation()

Note: 0x12 is only used by either W2BN/JSTR/DRTL/DSHR, while 0x50 can be used for any product

Spht

Quote from: LoRd[nK] on February 08, 2004, 12:02 AM
QuoteIf you sent Battle.net proper location information, it'll return the time in your timezone.

That's not true for profile keys.

Probably because profiles contain no time information? I'm referring to the system times stored on the Battle.net server for things like last game, last logon, etcetera.

Eric

#11
Quote
From BnetDocs:

SID_READUSERDATA (0x26)
Packet ID: 0x26
Direction: Server -> Client (Received)
Format:
Help (DWORD)       Number of accounts
(DWORD)       Number of keys
(DWORD)       Request ID
(STRING[])    Requested Key Values

I feel the term "profile keys" fits quite well with the information you'd put into the string array of a user data request, if you see it differently, so be it.

Aside from that, when the information returned from 0x26 is in FileTime format, the FileTime is sent in Battle.net Time, not Local Time, no matter if the information you send in 0x50 is accurate or not.

Now, I'm done arguing about something that I know is right.

Spht

Quote from: LoRd[nK] on February 08, 2004, 01:54 PM
Quote
From BnetDocs:

SID_READUSERDATA (0x26)
Packet ID: 0x26
Direction: Server -> Client (Received)
Format:
Help (DWORD)       Number of accounts
(DWORD)       Number of keys
(DWORD)       Request ID
(STRING[])    Requested Key Values

I feel the term "profile keys" fits quite well with the information you'd put into the string array of a user data request, if you see it differently, so be it.

Aside from that, when the information returned from 0x26 is in FileTime format, the FileTime is sent in Battle.net Time, not Local Time, no matter if the information you send in 0x50 is accurate or not.

Now, I'm done arguing about something that I know is right.

Yes, I was referring to whoever said using FileTimeToLocalFileTime to convert it to your local time would be a valid solution.

Eric

#13
Quote
If you sent Battle.net proper location information, it'll return the time in your timezone.

Yes, I was referring to whoever said using FileTimeToLocalFileTime to convert it to your local time would be a valid solution.
It is, but after that you'd still have to convert it to SystemTime to get the "real" date/time.

Spht

Quote from: LoRd[nK] on February 08, 2004, 01:58 PM
Quote
Yes, I was referring to whoever said using FileTimeToLocalFileTime to convert it to your local time would be a valid solution.
It is, but after that you'd still have to convert it to SystemTime to get the "real" date/time.

Assuming you want the time as a SYSTEMTIME structure, which isn't a requirement.