how to convert  int wow Timestamp to c# DateTime menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    GameAssist's Avatar Banned CoreCoins Purchaser Authenticator enabled
    Reputation
    98
    Join Date
    Apr 2010
    Posts
    349
    Thanks G/R
    55/83
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    how to convert int wow Timestamp to c# DateTime

    current int value for Timestamp = Read<int>(base_adr + 0x008C14DC)
    subj

    how to convert  int wow Timestamp to c# DateTime
  2. #2
    Viano's Avatar Active Member
    Reputation
    37
    Join Date
    May 2008
    Posts
    172
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Timestamp.ConvertIntWoWTimeStampToCSharpDateTime();
    No, I don't want reputation points.
    Viano

  3. #3
    LordJZ's Avatar Member
    Reputation
    11
    Join Date
    Jan 2009
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
            public static DateTime AsUnixTime(this uint i)
            {
                return (new DateTime(1970, 1, 1, 0, 0, 0, 0)).AddSeconds(i);
            }

  4. #4
    dook123's Avatar Active Member
    Reputation
    21
    Join Date
    Oct 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I want just one more sarcastic post!
    ------------------------------
    If not me than who?

  5. #5
    XTZGZoReX's Avatar Active Member
    Reputation
    32
    Join Date
    Apr 2008
    Posts
    173
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks to me like the OP's post was cut off by accident or something. Either way, I'll make myself a little useful.

    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);
            }
    Converts WowTime to DateTime.

  6. #6
    GameAssist's Avatar Banned CoreCoins Purchaser Authenticator enabled
    Reputation
    98
    Join Date
    Apr 2010
    Posts
    349
    Thanks G/R
    55/83
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    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 (

  7. #7
    TOM_RUS's Avatar Legendary
    Reputation
    914
    Join Date
    May 2008
    Posts
    699
    Thanks G/R
    0/52
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by wlastas View Post
    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 (
    That means that this value not unix time nor wow time...

  8. #8
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    .text:000DECBA         call    PerformanceCounter
    ...
    .text:000DECCE         mov     dword_8C14DC, eax
    If you're trying to get the server time from that offset then all I can say is good luck..

  9. #9
    TOM_RUS's Avatar Legendary
    Reputation
    914
    Join Date
    May 2008
    Posts
    699
    Thanks G/R
    0/52
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by _Mike View Post
    Code:
    .text:000DECBA         call    PerformanceCounter
    ...
    .text:000DECCE         mov     dword_8C14DC, eax
    If you're trying to get the server time from that offset then all I can say is good luck..
    tick count lol...

  10. #10
    GameAssist's Avatar Banned CoreCoins Purchaser Authenticator enabled
    Reputation
    98
    Join Date
    Apr 2010
    Posts
    349
    Thanks G/R
    55/83
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    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

  11. #11
    LordJZ's Avatar Member
    Reputation
    11
    Join Date
    Jan 2009
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  12. #12
    Batousan's Avatar Corporal
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    real game value: 1249111076

    LordJZ method return: 01 Aug 2009 07:17:56
    # perl -e 'print scalar(localtime(1249111076))'
    Sat Aug 1 03:17:56 2009

    close

  13. #13
    GameAssist's Avatar Banned CoreCoins Purchaser Authenticator enabled
    Reputation
    98
    Join Date
    Apr 2010
    Posts
    349
    Thanks G/R
    55/83
    Trade Feedback
    0 (0%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    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

  14. #14
    _Mike's Avatar Contributor
    Reputation
    310
    Join Date
    Apr 2008
    Posts
    531
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by wlastas View Post
    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
    It's not crap. You bringing up the context of server time is what's crap.

    Originally Posted by wlastas View Post
    it was necessary to immediately write "Dude you're wrong - it's not the server time and my brain does not soar
    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.

    Originally Posted by Batousan View Post
    # perl -e 'print scalar(localtime(1249111076))'
    Sat Aug 1 03:17:56 2009

    close
    What's your point? Unix time is utc based. LordJZ's function is correct.

  15. #15
    Batousan's Avatar Corporal
    Reputation
    1
    Join Date
    Oct 2010
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    Sorry for trying to help in my rush out the door to work ? jtfc.

Page 1 of 2 12 LastLast

Similar Threads

  1. How to edit your WoW Models
    By Cush in forum World of Warcraft Model Editing
    Replies: 27
    Last Post: 02-27-2007, 07:31 PM
  2. How do I use WoW Gliders?
    By lauweisheng in forum World of Warcraft General
    Replies: 1
    Last Post: 02-06-2007, 08:59 AM
  3. How to make a WoW Video!
    By Amedis in forum World of Warcraft Guides
    Replies: 6
    Last Post: 12-09-2006, 10:23 PM
  4. How do u make wow movies?
    By frigget in forum World of Warcraft General
    Replies: 2
    Last Post: 10-25-2006, 02:59 PM
  5. How do i make WOW screenshots i can it game into jpegs or something i can send?
    By Kaiserdog8390 in forum World of Warcraft General
    Replies: 4
    Last Post: 09-20-2006, 04:45 PM
All times are GMT -5. The time now is 10:51 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search