joelim
asked on
LInux Server Time and Date setting
does any one know how to configure the TIme and Date?
as i know, we can easily set it with using linuxconf and under the time and date, but it never shown the Time Zone, my time zone is GMT+800. yet, when i send mail thru my server, the data is early about 5 hours. how come?
please do give me some ideas about this. thank you!
as i know, we can easily set it with using linuxconf and under the time and date, but it never shown the Time Zone, my time zone is GMT+800. yet, when i send mail thru my server, the data is early about 5 hours. how come?
please do give me some ideas about this. thank you!
use
date -u
to set the time in the BIOS. Set it to GMT+0, then set your local time using the TZ environment variable in /etc/.profile etc. (also in /etc/rc.config for SuSE).
date -u
to set the time in the BIOS. Set it to GMT+0, then set your local time using the TZ environment variable in /etc/.profile etc. (also in /etc/rc.config for SuSE).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
oops, date -u does not set the BIOS, it just sets the time for the software clock of the kernel, right. The time in RTC (CMOS) must be set using the BIOS menu. Sorry for confusion.
While booting linux, hwclock is called to set the kernel clock according to the RTC, usually. So it is recommended that the RTC runs in UTC.
Unfortunately this causes problems if you have a multi-boot system, for example linux and M$, 'cause M$ doesn't care about the time, means it sets the RTC to if you change the time using M$'s dialogs :-((
While booting linux, hwclock is called to set the kernel clock according to the RTC, usually. So it is recommended that the RTC runs in UTC.
Unfortunately this causes problems if you have a multi-boot system, for example linux and M$, 'cause M$ doesn't care about the time, means it sets the RTC to if you change the time using M$'s dialogs :-((
ASKER
how do i set the GMT+800 to my linux redhat server?
i went to /etc/profile, i found nothing but infor about the hostname. how come?
i guess set the time for the software, exspecially the SENDMAIl is good enough. please advice! thanks guys!
i went to /etc/profile, i found nothing but infor about the hostname. how come?
i guess set the time for the software, exspecially the SENDMAIl is good enough. please advice! thanks guys!
as I said before, linux reads the time from the RTC (CMOS clock) while booting and uses it as initial value for the kernels software clock (see man clock, man hwclock).
So you first need to set the RTC using the BIOS.
To modify the kernels software clock use
date -u
All programs (deamons, application) on UNIX/Linux rely on the software clock and the TZ environment variable.
So you first need to set the RTC using the BIOS.
To modify the kernels software clock use
date -u
All programs (deamons, application) on UNIX/Linux rely on the software clock and the TZ environment variable.
joelim:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
[Insert recommendation here]
Please leave any comments here within the next seven days.
Accept vsamtani's comment as answer.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
troopern
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
[Insert recommendation here]
Please leave any comments here within the next seven days.
Accept vsamtani's comment as answer.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
troopern
EE Cleanup Volunteer
ASKER