• Sign Up Login
  • Features
    • Game Services
    • Real-time Analytics
    • LiveOps
    • Add-ons
  • Game Services
  • Real-time Analytics
  • LiveOps
  • Add-ons
  • Games
  • Pricing
  • Blog
  • Support
    • Docs
    • Forums
    • Contact
  • Docs
  • Forums
  • Contact
  • Sign Up Login
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
This question was closed Oct 31 at 11:51 AM by Muhammad Roshaan Tariq for the following reason: Problem is not reproducible
avatar image
Question by Muhammad Roshaan Tariq · Jun 19 at 01:48 AM · apissdks

Redundant DateTime Value

Hi, I'm using this Client GetTime function to get server time for preventing players to cheat by changing DateTime of device. But the issue I'm facing at random is that it returns the garbage value or redundant value.

Below is the JSON of my player data in which I have stored the server time I got from server

json.png

What could be the problem here?

json.png (28.6 kB)
Comment
Roshaan

People who like this

1 Show 1
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Muhammad Roshaan Tariq · Jun 19 at 12:19 PM 0
Share

Check "deployedTime" in the picture I have attached of my JSON

1 Reply

  • Sort: 
avatar image
Best Answer

Answer by SethDu · Jun 19 at 07:42 AM

What SDK you are using?

The type of Time in the callback response is DateTime. If you are using a strong typed language, you need to convert it before use.

ps. If you are referring this doc:https://docs.microsoft.com/en-us/rest/api/playfab/client/title-wide-data-management/gettime?view=playfab-rest#gettimeresult, we have noticed that the this API documentation is incorrect and will file a doc change request shortly.

Comment

People who like this

0 Show 11 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Muhammad Roshaan Tariq · Jun 19 at 07:48 AM 0
Share

Hey @SethDu, I'm using this function of Client SDK

and I know it's DateTime and I'm recieving it in a DateTime object but it sometimes give me the response as shown in the image I have attached. Please check "deployedTime"

avatar image SethDu ♦ Muhammad Roshaan Tariq · Jun 19 at 07:59 AM 0
Share

Player Data can only store string. I have tested GetTime API, and the result is fine. The thing you need to do seems to convert the DateTime to String.

avatar image Muhammad Roshaan Tariq SethDu ♦ · Jun 19 at 08:27 AM 0
Share

I am storing the DateTime in string format using the System.Convert class in C#
What I'm stating here as a problem is that it sometimes gives the value as shown in the image which an incorrect timestamp. Could please look into it?

Show more comments
avatar image Muhammad Roshaan Tariq Muhammad Roshaan Tariq · Jun 20 at 07:07 AM 0
Share

Can you link me to the documentation where it shows how to write custom Playstream events?

avatar image SethDu ♦ Muhammad Roshaan Tariq · Jun 20 at 07:29 AM 0
Share

Sure thing. https://docs.microsoft.com/en-us/gaming/playfab/features/analytics/metrics/playstream-events.

Show more comments

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Getting InvalidDropTable when calling EvaluateRandomResultTable 1 Answer

    Are Epic Games Store SDK API calls available as a REST API callable by a Cloud Script? 1 Answer

    UpdateCharacterData problem and characterID . 2 Answers

    Possible for a server to retrieve its own tags (GameInfo)? 1 Answer

    Google Login for Android and iOS 4 Answers

    • PlayFab

      • Features
      • Games
      • Pricing
      • Blog
    • Engineers

      • Documentation
      • Quickstarts
      • API Reference
      • SDKs
      • Usage Limits
    • Support

      • Forums
      • Videos
      • Contact
      • Service Health
      • Terms of Service
    • Social

      • Facebook
      • Twitter
      • LinkedIn
      • YouTube
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • About Microsoft
    • Jobs
    • Accessibility
    • Diversity & inclusion
    • Security
    • Company news
    • © Microsoft 2019
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Post an idea
    • Create an article
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges