current int value for Timestamp = Read<int>(base_adr + 0x008C14DC)
subj
current int value for Timestamp = Read<int>(base_adr + 0x008C14DC)
subj
Timestamp.ConvertIntWoWTimeStampToCSharpDateTime();
No, I don't want reputation points.
Viano
Code:public static DateTime AsUnixTime(this uint i) { return (new DateTime(1970, 1, 1, 0, 0, 0, 0)).AddSeconds(i); }
I want just one more sarcastic post!![]()
------------------------------
If not me than who?
Looks to me like the OP's post was cut off by accident or something. Either way, I'll make myself a little useful.
Converts WowTime to DateTime.Code:public static DateTime GetDateTimeFromGameTime(int packedDate) { var minute = packedDate & 0x3F; var hour = (packedDate >> 6) & 0x1F; var day = (packedDate >> 14) & 0x3F; var month = (packedDate >> 20) & 0xF; var year = (packedDate >> 24) & 0x1F; return new DateTime(year + 2000, month + 1, day + 1, hour, minute, 0); }
real game value: 1249111076
LordJZ method return: 01 Aug 2009 07:17:56
XTZGZoReX method return: 16 Aug 2010 16:36:00
real server time = DateTime.Now: 02-03-2010 0:54:29
both methods are wrong (
If you're trying to get the server time from that offset then all I can say is good luck..Code:.text:000DECBA call PerformanceCounter ... .text:000DECCE mov dword_8C14DC, eax
I do not see anything funny..
http://www.mmowned.com/forums/world-...ml#post2039412
JuJuBoSc :Elite User share : Timestamp = 0x008C14DC, // 4.0.6 13623
0x008C14DC this is a real timer. The values of this register is written as start value to Spells cooldown && Auras cooldown
This value is constantly increasing, and 3 senior level responsible for ms, and 4 digits to the right - this timer seconds
at the time of my post value is 1296072899
I was interested in how WOW packs 64bit value date of 32 bits - it's quite interesting for many problems
---------- Post added at 06:42 AM ---------- Previous post was at 06:34 AM ----------
2 XTZGZoReX
http://www.mmowned.com/forums/world-...ml#post2048673
this code is full of crap, because you just threw away and did not take into account the value of seconds, and milliseconds, which clearly has in Timestamp
just watch out for Timestamp - it changes 1000 times per second, ie an accuracy of 1 ms
wlastas, 1296072899 is tick count in your case (number of milliseconds since system start).
XTZGZoReX was talking about packed date used in wow calendar, etc.
you fail.
# perl -e 'print scalar(localtime(1249111076))'real game value: 1249111076
LordJZ method return: 01 Aug 2009 07:17:56
Sat Aug 1 03:17:56 2009
close
OK, I rebooted the computer and see that the counter is reset - it seems that you are right about the "number of milliseconds since system start"
Then what was sent
http://www.mmowned.com/forums/world-...-datetime.html # post2048568
it was necessary to immediately write "Dude you're wrong - it's not the server time and my brain does not soar
It's not crap. You bringing up the context of server time is what's crap.
That's what I did.. It's not my fault you don't know what a performance counter is. And my brain certainly does not soar anywhere atm.
What's your point? Unix time is utc based. LordJZ's function is correct.
Pointing out that it's close enough he can assume it is correct with a timezone offset.What's your point? Unix time is utc based. LordJZ's function is correct.
Sorry for trying to help in my rush out the door to work ? jtfc.