TZ variable setting for denx 2.4.20
Hi all,
I am trying to find a way of setting TZ environment variable with DST support for southern hemisphere countries. Its giving a strange problem. In southern hemisphere countries, DST starts around Oct and ends around March. The DST time seems to be applicable from Oct until Dec31,19:00hrs. Then it reverts back to standard time.
For northern hemisphere countries, its working perfectly.(Here DST starts around March and ends around Oct. There is no year crossing DST period.)
I am sending the system timezone at various times..
bash> export TZ="xxx5:30yyy4:30,M10.1.1,M2.1.1"
bash> date 10010159
Mon Oct 1 01:59:00 xxx 2001
bash> date
Mon Oct 1 01:59:47 xxx 2001
bash> date
Mon Oct 1 03:00:10 yyy 2001
bash> date 12311900
Mon Dec 31 19:00:00 yyy 2001
bash> date 12311959
Mon Dec 31 18:59:00 xxx 2001 <----------- problem. It should have reverted to xxx only in feb.
Please give me some idea for setting time zone for southern hemisphere countries.
I am using 2.4.20 linux kernel from denx.I am running date command from busybox version 0.6 which in is using strftime. The processor is ppc860T.
Regards,
Robin Mathew
Quoted 2 lines · In message <[email protected]> you wrote:
I am trying to find a way of setting TZ environment variable with DST
Your subject is misleading. Timezone handling is a user space issue. It has nothing to do with the kernel verison.
Quoted 1 line
I am using 2.4.20 linux kernel from denx.I am running date command from
This has nothing to do with your problems.
Quoted 1 line
busybox version 0.6 which in is using strftime. The processor is ppc860T.
BB 0.6 ? AFAICT there is no such version. Do you mean busybox-0.60.5 ?
This is awfully old. Maybe you should try running an up-to-date version of busybox first? If this doesn;'t work, please consider using the real GNU date command. You should understand that the busybox tools only provide limited functionality, so fancy features like complex timezone support may not be available.
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Status quo. Latin for "the mess we're in."
Thanks for your response..
I have tried with the standard linux date too. That too doesnt seem to consider timezone variable that has been set. Can you give me a way for setting timezone for southern hemisphere countries?? The busybox code uses strftime function. But that does not seem to consider TZ variable...
Regards,
Robin
Quoted 28 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:
I am trying to find a way of setting TZ environment variable with DST
Your subject is misleading. Timezone handling is a user space issue. It has nothing to do with the kernel verison.
Quoted 2 lines
I am using 2.4.20 linux kernel from denx.I am running date command from
This has nothing to do with your problems.
Quoted 2 lines
busybox version 0.6 which in is using strftime. The processor is ppc860T.
BB 0.6 ? AFAICT there is no such version. Do you mean busybox-0.60.5 ?
This is awfully old. Maybe you should try running an up-to-date version of busybox first? If this doesn;'t work, please consider using the real GNU date command. You should understand that the busybox tools only provide limited functionality, so fancy features like complex timezone support may not be available.
Best regards,
Wolfgang Denk
Robin,
Quoted 1 line · Robin
I have tried with the standard linux date too. That too doesnt seem to consider timezone variable that has been set. Can you give me a way for setting timezone for southern hemisphere countries?? The busybox code uses strftime function. But that does not seem to consider TZ variable...
You should read up on how glibc handles all that timezone stuff:
sh# info libc "TZ Variable"
Most notably, make sure you /etc/localtime is set up correctly. There is also a tool (script) called tzselect which may be helpful for you.
Note I'm not exactly an expert on this, I'm just giving pointers...
Regards,
Marius
Signature · 4 lines
Marius Groeger <[email protected]> SYSGO AG Embedded and Real-Time Software Voice: +49 6136 9948 0 FAX: +49 6136 9948 10 www.sysgo.com | www.elinos.com | www.osek.de | www.imerva.com
Hi
Thanx for your response. I am setting TZ variable as given in the documentation.
export TZ="xxx5:30yyy4:30,M10.1.1,M2.1.1"
Its working fine till Dec 31 23:59:59GMT. On Jan 01 00:00:00, its not taking DST into account at all.
Please tell me some way of setting it across an year boundary. Thanks,
Robin
Quoted 18 lines · Marius Groeger
Robin,
Quoted 1 line · Robin
I have tried with the standard linux date too. That too doesnt seem to consider timezone variable that has been set. Can you give me a way for setting timezone for southern hemisphere countries?? The busybox code uses strftime function. But that does not seem to consider TZ variable...
You should read up on how glibc handles all that timezone stuff:
sh# info libc "TZ Variable"
Most notably, make sure you
/etc/localtimeis set up correctly. There is also a tool (script) called tzselect which may be helpful for you.Note I'm not exactly an expert on this, I'm just giving pointers...
Regards,
Marius
What's denx?
Anyway, in my embeded ppc-linux, I set it with/etc/TZ
echo "PST8PDT" > /etc/TZ to set it to pacific time.
Have fun.
-Tony
Quoted 42 lines · Robin
Hi
Thanx for your response. I am setting TZ variable as given in the documentation.
export TZ="xxx5:30yyy4:30,M10.1.1,M2.1.1"
Its working fine till Dec 31 23:59:59GMT. On Jan 01 00:00:00,
its not taking DST into account at all.Please tell me some way of setting it across an year boundary. Thanks,
RobinQuoted 15 lines · Marius Groeger
Robin,
Quoted 5 lines · Robin
I have tried with the standard linux date too. That too doesnt seem to consider timezone variable that has been set. Can you give me a way for setting timezone for southern hemisphere countries?? The busybox code uses strftime function. But that does not seem to consider TZ variable...
You should read up on how glibc handles all that timezone stuff:
sh# info libc "TZ Variable"
Quoted 8 lines
Most notably, make sure you
/etc/localtimeis set up correctly. There is also a tool (script) called tzselect which may be helpful for you.Note I'm not exactly an expert on this, I'm just giving pointers...
Regards,
Marius_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Signature · 2 lines
-Tony Having fun with FPGA HW + ppc + Linux
I am not sure what hapenned to the SPI driver that was out there for the 8xx that I wrote a long time ago. I know that it was working fine then. I do have a version now that works great. I'll try and make it available somewhere real soon. But this one's only for the 2.4 kernel and not the 2.6 kernel.
Quoted 47 lines · --- Robin
Hi all,
I am trying to find a way of setting TZ environment variable with DST
support for southern hemisphere countries. Its giving a strange problem.
In southern hemisphere countries, DST starts around Oct and ends around
March. The DST time seems to be applicable from Oct until Dec31,19:00hrs.
Then it reverts back to standard time.For northern hemisphere countries, its working perfectly.(Here DST starts
around March and ends around Oct. There is no year crossing DST period.)I am sending the system timezone at various times..
bash> export TZ="xxx5:30yyy4:30,M10.1.1,M2.1.1" bash> date 10010159
Mon Oct 1 01:59:00 xxx 2001
bash> date
Mon Oct 1 01:59:47 xxx 2001
bash> date
Mon Oct 1 03:00:10 yyy 2001
bash> date 12311900
Mon Dec 31 19:00:00 yyy 2001
bash> date 12311959
Mon Dec 31 18:59:00 xxx 2001 <----------- problem. It should have
reverted to xxx only in feb.Please give me some idea for setting time zone for southern hemisphere
countries.I am using 2.4.20 linux kernel from denx.I am running date command from
busybox version 0.6 which in is using strftime. The processor is ppc860T.Regards,
Robin Mathew
Quoted 4 lines
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Quoted 1 line
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo