I'm working on an embedded system with linux. I'm trying to change the timezone used by the operating system and I'm doing this by copying the timezone file from /usr/share/zoneinfo to /etc/localtime (ie.: #cp /usr/share/zoneinfo/Europe/Rome /etc/localtime).

So far so good: the time change accordingly. Anyway there are two weird things:

  1. if I print the file /etc/timezone I found "Universal" and not /Europe/Rome as I would expect
  2. I tried to simulate the automatic time change when the daylight saving time occurs but it seems that the time still remain at the old value.

Any help would be appreciated.

  • A copy of the zoneinfo file does not change the /etc/timezone file. – ott-- Jul 19 '13 at 21:25
  • Thanks ott, but what I can do more? Could be this the cause of the other problem (the missing automatic datetime update on daylight saving time)? – lordpurple Jul 19 '13 at 22:46
  • What libc is the embedded system running? (e.g. Glibc, ucLibc, dietlibc, …) What userland utilities? – Gilles Jul 19 '13 at 23:43
  • I'm not sure of what kind of libc are installed but I assume glibc. How can I check this? Moreover at what kind of utilities are you referring? – lordpurple Jul 20 '13 at 0:06
  • Might be a stupid question but does the system have tzselect on it? I don't think using ln to the zoneinfo files is the appropriate way to do this. – slm Jul 20 '13 at 1:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.