Sometimes we have account on GNU/Linux operating system that is located in a different time zone and its system-wide TZ setting doesn't reflect our reality.
It is possible to have different time zone setting for a process and all processes that are its descendants. That process can be a login shell.
To setup different time zone just edit
~/.bashrc file and add the following:
CITY with preferred values, for instance:
To commit the changes immediately do:
source ~/.bashrc or
Such setting will have effect on any Bash process executed by you, even non-interactive. If you would like only interactive shell to use different time zone settings, you have to edit different file, e.g.
~/.bash_profile for Bash or
~/.profile for POSIX-compliant shells.
To manually ensure that the changes are made for just login shell processes you may add simple condition around:
if [ "$PS1" ]; then
Before you apply these instructions check if the directory
/usr/share/zoneinfo contains proper files and directories. If not, ask your system administrator to install