Time format changed from function Shared.GetSystemTime()

SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
edited June 2013 in Modding
Reason why ns2stats.org has not been saving games.. took while to notice where problem was, is there any function which returns time in old format left?
Now it seems to return seconds from server restart which is bad news for ns2stats since it was using that function to determine date for games.

Examples:
Now it returns: 41879.765824649
Previously it returned: 1365513437

Comments

  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    I switched to using Shared.GetGMTString(boolean), where the boolean determines if the string returned should be encased in quotes.

    It returns a string like this:
    !  Shared.GetGMTString(false) = 
    2013-06-14 16:32:01
    
  • SintSint Join Date: 2007-01-09 Member: 59540Members, Squad Five Blue
    xDragon wrote: »
    I switched to using Shared.GetGMTString(boolean), where the boolean determines if the string returned should be encased in quotes.

    It returns a string like this:
    !  Shared.GetGMTString(false) = 
    2013-06-14 16:32:01
    

    Thanks that should be good enough.
  • fsfodfsfod uk Join Date: 2004-04-09 Member: 27810Members, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    The function should be back to its old behaviour in the next release. There's also unix style time functions in the stripped down os lib which might also work for you
Sign In or Register to comment.