# Qcom timezone sync not working

**URL:** <https://forum.legato.io/t/qcom-timezone-sync-not-working/4826>\
**Category:** Legato Application Framework\
**Created:** [November 9, 2019, 8:51am UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826 "2019-11-09T08:51:56Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![paap](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paap](https://forum.legato.io/u/paap)\
**Post date:** [November 9, 2019, 8:51am UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/1 "2019-11-09T08:51:56Z")

</div>

Hi,  
Im using qcom time as default in WP7502. I can sync system time with “date”:  
Testing connection … ok  
root@swi-mdm9x15:~# date  
Sat Nov 9 08:37:06 UTC 2019

But how can i update timezone in my code? I tried at-commands:  
+CREG: 0,1  
OK  
at+cclk?  
+cclk: “19/11/09,08:33:33+08”  
OK  
at+ctzu?  
+CTZU: 1  
OK  
But no success, timezone is still wrong. How to change timezone from my code?  
Thanks for any help.

---

<div class="post-metadata">

**Author:** ![paap](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paap](https://forum.legato.io/u/paap)\
**Post date:** [November 11, 2019, 9:12am UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/2 "2019-11-11T09:12:25Z")

</div>

So my question is how can I change Legato system time zone by my code. If the modem goes to another country, time zone should be updeated automatically. Like my mobile phone does when I travel to different countries. Any instructions please?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [November 11, 2019, 11:14am UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/3 "2019-11-11T11:14:51Z")

</div>

Did +cclk value change correctly when you move to another country?

---

<div class="post-metadata">

**Author:** ![paap](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paap](https://forum.legato.io/u/paap)\
**Post date:** [November 11, 2019, 11:59am UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/4 "2019-11-11T11:59:23Z")

</div>

yes, +cclk shows correct time and timezone. How to update Legatos timezone?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [November 11, 2019, 12:00pm UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/5 "2019-11-11T12:00:54Z")

</div>

Do you mean the "date"command not working?

---

<div class="post-metadata">

**Author:** ![paap](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paap](https://forum.legato.io/u/paap)\
**Post date:** [November 11, 2019, 12:02pm UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/6 "2019-11-11T12:02:53Z")

</div>

“date” command is working for time and date, but timezone does not change.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [November 11, 2019, 12:05pm UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/7 "2019-11-11T12:05:07Z")

</div>

Can this help?

> **[How To: 2 Methods To Change TimeZone in Linux](https://www.thegeekstuff.com/2010/09/change-timezone-in-linux/)**
>
> Question: When I installed the Linux OS, I forgot to set the proper timezone. How do I change the timezone on my Linux distribution. I use CentOS (Red Hat Linux). But, can you please explain me how to do this on all Linux distributions with some...

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [November 11, 2019, 12:07pm UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/8 "2019-11-11T12:07:17Z")

</div>

Also you can have a look here

> **[Set Linux System Date & Time on mangOH Yellow](https://forum.mangoh.io/t/set-linux-system-date-time-on-mangoh-yellow/2965/2)**
>
> You can set it from the host as follows: ssh root@192.168.2.2 "date -s ‘$(date +%F)’ " ssh root@192.168.2.2 "date -s ‘$(date +%T)’ " Inconveniently date and cm rtc use different formats so it’s not simple to set one from the other.

---

<div class="post-metadata">

**Author:** ![paap](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paap](https://forum.legato.io/u/paap)\
**Post date:** [November 11, 2019, 12:27pm UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/9 "2019-11-11T12:27:20Z")

</div>

Yes, we checked this earlier, but we could not find “localtime” or “timezone” files in etc. Where are their located in Legato?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [November 11, 2019, 12:50pm UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/10 "2019-11-11T12:50:52Z")

</div>

How about setting timezone by date command  
How about using command “tzoneset”?

How about the following?

> **[settz - Legato Docs](https://docs.legato.io/latest/toolsHost_settz.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

---

<div class="post-metadata">

**Author:** ![paap](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paap](https://forum.legato.io/u/paap)\
**Post date:** [November 11, 2019, 1:08pm UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/11 "2019-11-11T13:08:25Z")

</div>

Yes, settz works with host. But we need to do it by our code.  
Is there “timezone”-file available in legato?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [November 11, 2019, 1:20pm UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/12 "2019-11-11T13:20:09Z")

</div>

I dont know as i don’t have module in hand, you can search by yourself.  
Btw, How about using command “tzoneset”?

---

<div class="post-metadata">

**Author:** ![paap](https://avatars.discourse-cdn.com/v4/letter/p/87869e/32.png) [@paap](https://forum.legato.io/u/paap)\
**Post date:** [November 11, 2019, 1:53pm UTC](https://forum.legato.io/t/qcom-timezone-sync-not-working/4826/13 "2019-11-11T13:53:57Z")

</div>

We can set the timezone by host machine, but as I understand it is not possible to do it by code. Anyway we will manage with this, Thanks.
