How do I change timezone with clock?

Trying to make a universal clock app have the basics done. Have button which changes time zone to Malaysia. Difference is 4 hours. Whenever that click the button it says the same time zone which I am in. How to fix?

Welcome [quote="W1CK3D_W0LF, post:1, topic:37440"]
the same time zone which I am in.
[/quote]

Android automatically provides the local time for wherever you are located. Local time is the lower example. An adjusted time of +4 hours is shown in the upper example. You can also subtract time using a negative value.

To display or adjust the time add or subtract the time difference between your actual location and the location for which you want the time.

The https://www.timeanddate.com/time/map/ shows the difference between your local time and UTC time; you can use that as a guide to figure out what the offset is from your local time.

Did that help?

1 Like

Datetime format Z might help. See