Time Zone Format in Clock Component

I am trying to get timezone of device in XX format like for GMT+0500, label shoud display +05, the patern required for this formating is "X" which I have got from Simple Date Format.
Below is the block of code which I was testing for display of date-time in different formats. First 2 labels display exacltly as intended but the last two return an error message.


Result:
image
This is the error message
image

Error comes from label3's text settings

Label's 4 settings should work . Tested with companion



1 Like

Most probably the error comes from emulator, try to test it with companion or as apk

1 Like

Describe the device that gives you this error message?
OS?
Version?
Make?

Yes, you were right, when I have tested on android device, all labels display correct values with the same code.

1 Like

Thanks every one :+1: :smiley:

1 Like

Hi, although problem has been solved but I was wondering how you have displayed the results as label comments?

Connect companion, right click on block and select Do it

image

1 Like

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

Thanks for pointing out the help section

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.