DateTools : Some tools to work with date and time

I try to get online date-time
Sometimes this happened :disappointed: but most of the time it’s working fine

3 Likes

That’s because of slow internet connection.Timeout set for NTP server is set 10 sec and if request takes more time than this then it will throw that exception.
You can use ‘is number’ block to check whether response is epoch timestamp or exception.

You can use ‘is number’ block to check whether response is epoch timestamp or exception.
What you mean ‘is number’ block and where i can get it

3 Likes

You can find it in Math category.

how can i use number block with this method??

3 Likes

Like this:

image

Its Correct ? Any issue ? with these blocks
blocks (9)

3 Likes

Yes that is correct.

Thank you :pakistan: :heart_eyes:

3 Likes

Vknow360’s extensions are always great

Can anyone help me to show the blocks ‘‘how i get online date value not device date’’
Please…

Hi @anyhelp24hr
Can you show what you have tried?
If you have not tried anything from yourself then I suggest you read all posts again.

3 Likes

I got it
thanks lot for your reply… :heart_eyes: :heart_eyes: :gift_heart: :gift_heart:

How can I know the time and the date of a specific time zone differente from my local time zone?

use the clock component and its FormatDate method together with the pattern Z, see also App Inventor Code Snippets | Pura Vida Apps

for a list of all patterns see also SimpleDateFormat (Java Platform SE 7 )

Taifun

1 Like

Sometimes I get this error =

The operation EpochToDateTime cannot accept the arguments: , [java.net.UnknownHostException: Unable to resolve host “1.pool.ntp.org”: No address associated with hostname], [dd/MM/yyyy], [Asia/Calcutta]

I think this is no longer usable.
I shall remove it (that server) in next update.

4 Likes

can you tell us, in how many days you will update your extension? :sweat_smile:

3 Likes

I am not sure :sweat_smile:

2 Likes

can you tell me approx time it will take?
I am using your extension in my app at 3-4 places, so I have to change all of them because my app is ready to publish :sweat_smile:

2 Likes