Tuesday, June 14, 2011

System Time change, Great power & great responsibility

Yesterday I had to run a testcase which requires the system time to be moved to future. I did some time travelling without much of a problem but faced some consequences. At times system is confused why I had to change my system time too often and gave 3 statements of warning. One of them is from the famous Stan lee's spider man comics' dialogue "great power comes with the great responsibility".




It gave the warnings shown below.

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

I never understood the real meaning of it till I faced the following issues :)

1) Text Copying did not work in some of the applications, and it made few illusions when I didn't realize it :)

2) Javac did not identify some of the class files as outdated, and it did not recompile the changed class. It happened when I compiled the classfiles in the future date and reverted to the current date back, and made some changes and expected the compiler to compile it for me. It led to a big confusion :)

3) Some of the generated ejb classes were not regenerated again, so I got few "cannot find symbol" compilation errors

Finally I had to "touch" each of the files to make sure their Last updated timestamp points to the current time.

find . -exec touch {} \;

So please make sure you give importance to the warning Stan Lee's warning "great power comes with the great responsibility" :)


Note : Finally I switched to database date/time column update than doing this dangerous frequent system time change.

No comments:

Post a Comment