Time zone for document creation time

0 votes
Hello. What is the time zone for the document creation time parameter?
asked Jul 12, 2015 in App42 Cloud API-BaaS by chetruscavladislav (10 points)

1 Answer

+1 vote
Hello Vlad,

 

Its utc timezone(format: "2015-07-12T05:36:27.254Z") for documentation creation. It will set internally when you call insert JSON document from client.

Let me know if it helps.

Thanks,

Himanshu Sharma
answered Jul 12, 2015 by hs00105 (2,005 points)
Hello,

And What would be the best way to estimate the elapsed time since the creation of a document ???

Would be a good idea to use the custom code service for that ?

Thank you.
Hi,

Could you please let me know the complete use case of finding the elapsed time because it depends on app use case that how you want to calculate the elapsed time. In order to use the custom code, yes definitely if you want to write some custom logic then you can use our custom code service. Please have a look at this (http://api.shephertz.com/tutorial/Server-Side-Custom-Code/?index=customcode-wrd) link for the same and let me know if you need any help from my side.

regards,
Himanshu Sharma
Hi Himanshu,

What I actually need is to estimate the elapsed time since a document was inserted in the cloud, using :

jsonDoc.GetCreatedAt();

But this estimation can't be affected by End-User devices.

I'm not sure if I must take into account the user time zone.

Or if I would need to use the App42 Timer Service.

Thank you very much for your help.
Hi,

In order to solve this query, please fetch Utc time to find the elapsed time. Why? Because, the time which you will get at the time of jsonDoc.GetCreatedAt(); is UTC time, so either user have the different time zone, you will get the correct elapsed time.   

Let me know if it resolve your issue.

P.S If you need any help while fetching the Utc time, then let me know your App42 SDK and it's version. It will help us to provide better support to you.  

regards,
Himanshu Sharma
App42-Unity3D-SDK-4.1.2

 maybe something like :

System.DateTime saveUtcNow = System.DateTime.UtcNow;

Thank you very much Himanshu.
Hi,

You can use the GetUTCFormattedTimestamp function of Util class which is available in App42 SDK. You can call this method by using the below code:

Util.GetUTCFormattedTimestamp ();

Let me know if it helps.

Regards,
Himanshu Sharma
I think it's just what I need.

Thank you Himanshu.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...