Pls HELP! - Daylight saving Time problem on Linux RHEL4
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Pls HELP! - Daylight saving Time problem on Linux RHEL4
Dear gents,
let me please describe as accurate as i can the problem i am facing:
1) I am having a RHEL4 Server - timezone is GMT+2
/etc/localtime is perfect and i checked the data inside as well
2) My Server is synchronized perfect with ntp as well
date and hwclock are working on second, just perfect
3) I have a JRE ( 6.12 ) latest version
no tzdata updated needed
So far all looks good.
In the last week-end we moved to summer time ( current date -1 HOUR ) all of the above are still perfect just that : here are the problems that are appearing now :
PROBLEM 1) when a file is created through a JAVA application the date is in older date ( when i look at the time on which was created the file it is in 1 Hour in advance )
I built a small Java program that runs the current date of the System and the program runs just fine and displays the correct daylight saving time. Very wierd then!
PROBLEM 2) If i create a file throguh WINSCP the date of the file is just fine and correct. But if i create a FOLDER through the same WINSCP the time is again 1 HOUR in advance. Same happens if i use "mkdir" command the time is 1 HOUR in advance ( implying that was not moved to the summer time yet )
I reboot the system - thought this will help clear some caches but is still the same.
All i am thinking now is that some applications ( maybe even services ) will not take the daylight saving time that is set inside the Server and i do not know why and how to fix this ?
Much appreciated a solution or ideas that will lead me to a fixture for problem described.
Following my previous post
i've checked a few more servers and i have a very wierd feeling here as what i described, happens exactly the same on all of my Servers - even on Servers with OS other than RHEL4 - for example CentOS 5.
Therefore i would very much appreciate if other people can run some checks on their Server and tell me if they experience the same :
The test is for all in DTS East Europe or all the others that in last week-end of march moved to sumer time:
while <<date>> and <<hwclock>> and <<zdump /etc/localtime | grep 2009>> are all perfect ( you can even check the $TZ to see is ok - not that it matters ) create a directory with <<mkdir>> and check the date of the creation: if is 1 HOUR in advance = you can join my CLUB
It's also working here (with timezone GMT+2 as you):
Code:
[root@lab1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
[root@lab1 ~]# date
Fri Apr 3 16:35:16 EEST 2009
[root@lab1 ~]# hwclock
Fri 03 Apr 2009 04:35:21 PM EEST -0.529343 seconds
[root@lab1 ~]# mkdir test
[root@lab1 ~]# ls -ld test
drwxr-xr-x 2 root root 4096 Apr 3 16:35 test
Tested also on a couple of Slackware boxes with the same results.
I guess you have to (re)move /etc/adjtime
I hope you will forgive my stupidity in what i said before ( i made some mistakes ) but i've been in a real nightmare for the last days trying to solve this problem ( this is on ALL my Servers as i said ) - please bare with me once more.
So with your permission here are my problems ( i face this on ALL my Servers ) :
Is true ALL that you both said.
Even on ALL my Servers i receive the same - which is good but.
I presume you all use a SSH client ( like putty or similar ).
But here are my problems :
1) if i connect remotly with a client ( like WINScp or Windows Explorer or an FTP client like CuteFTP ) and i create folders and files through the remote clients - the dates of the folders and files gets messed.
Now, as long as the mess would be ONLY on the CLIENT, would be ok somehow ( maybe the client software has bugs ) but the mess get into the Linux Server as well.
1) Let's try a scenario ( i would very much appreciate if you can confirm this to me ) :
let's create an empty file through WinSCP client remotly.
If i look at the file creation time ( it looks fine ).
But if i go on the Server ( with putty ) and i do
ls -ld created file
i receive the date - 1 HOUR ( and not as it should )
I want to emphasize that if i use putty to create the file - all is okey.
2) 2-nd scenario also thorugh WinSCP ( but other clients will give crazy results as well ) is to create a folder - and check the date through WinSCP ( the date of the folder is date + 1 HOUR )
But if i check the date of the folder through putty - YES - it displays the correct date and not like in WinSCP.
I hope i am coherent this time ( i made some mistakes because i was geting confused myself before - and for this i appologize again )
Again scenario 1) it really hurts me - while in scenario 2) i could believe is a bug on client for which i can live with it just fine.
Looking forward for your replies - i will keep investigating ( for instance with CuteFTP as client i received delyas of 3 Hours.
I want to say that i am talking here ONLY ABOUT DST PROBLEMS ( these are the ONLY delays i am reffering here and not delays of time because of any other reasons ).
The file /etc/adjtime should have no connection to this.
Thanks a lot - will much appreciate your comments.
Arky
If have tested what you said and I can confirm the 2nd scenario. I.e. in winscp the creation time is +1h the current time, meanwhile on the server the time is correct!!!
Tested also with WS_FTP: the folder created was -3h!!! while the time on the server was correct again.
As i said while we can live with scenario 2) ( the problem is on the CLIENT software only ) that is fine,
BUT Scenario 1) worries me a lot ( a file remotly created ) has a wrong date ( the error is DST time related , can be 1 hour in some clients software and yes 3 hours in others )
Now, am i being wrong when i say "i am very worried" ? - i still believe i should be very worried and see no reason yet not to be - as long as the date on the Server ( measured through putty ) seems wrong!
It seems that is a windows problem according to this and this.
I'm not worried as I don't do any operations, like rsync, backup or whatever between linux/windows.
giving your last post - we can go and close this thread.
I will say just that : i will keep being worried not because of back-up operations between Linux and Windows ( i don't do such things either ) but because backups operations or any other operations which are strongly related to the date of the files - i agree that it can be minimized though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.