0

I work on a remote Linux machine which is located in a timezone which is off by 9h from my local time. I spend most of my time working from the shell, dealing with files versions and logs. Because the timestamps are that different, it is very confusing to work with them; I can see how eventually I am going to make a big mistake.

Is there anything that can be done so that when the client opens a remote session the host uses a different time setting?

1

You can set TZ to your local time zone on the remote system when you log in, e.g. in your shell’s startup script if you have your own account and you always log in from the same timezone. That will result in timestamps which are recalculated when output to be displayed in your chosen time zone: for example, timestamps shown in the output of ls.

However you can’t change timestamps which have been stored as text, for example in log files; they will be in whatever time zone the program which wrote them is configured to use.

So I think that switching your time zone might cause its own share of errors, since you’d have to convert log message timestamps but not file timestamps and so on.

  • That works indeed. Command "tzselect" can be used in RedHat to ease with the set of TZ variable – Almendrico Aug 9 at 15:25

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.