> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Changing the time zone in the Linux shell

> Learn to set the Linux shell time zone using the TZ variable with sample code and helpful links.

This article describes how to use the **TZ** environment variable to set the time zone for a shell account.

By default, the Linux shell uses the host server's time zone. If you are located in a different time zone, you can change this setting by using the **TZ** environment variable.

<Note>
  Hosting.com's servers are located in the US Eastern Standard Time (EST) time zone.
</Note>

The **TZ** environment variable affects file and directory timestamps, as well as output from the **date** command. The following example shows how to set the time zone for California using the **TZ** environment variable:

```
export TZ="/usr/share/zoneinfo/America/Los_Angeles"
```

To make the setting take effect for subsequent logins, you can add this line to the *\~/.bash\_profile* file or *\~/.bashrc* file.

<Tip>
  * To view all of the time zones available on a server, run the **tzselect** program. You can select time zones based on geographical region and country, and then set the appropriate TZ value in the *\~/.bash\_profile* file or *\~/.bashrc* file.

  * For a complete list of time zones, please visit [https://en.wikipedia.org/wiki/List\_of\_tz\_database\_time\_zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
</Tip>

## Related articles

* [Changing the time zone on a managed hosting account](/docs/changing-the-time-zone-on-a-managed-hosting-account)

* [Changing the time zone in webmail](/docs/changing-the-time-zone-in-webmail)

* [Converting the MySQL time zone](/docs/convert-the-mysql-time-zone)
