TBLinux:Changing the Time Zone
Candy Chan (Talk | contribs) |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | The time zone of the TMG3200 is configured on the Linux host using the '''< | + | The time zone of a Tmedia unit, such as the TMG800 or TMG3200, is configured on the Linux host using the '''<code>tzselect</code>''' command. <br> <br> '''The following is provided as a sample of how to configure a time zone:'''<br> NOTE: User-typed parameters are shown in red. |
− | <br> | + | |
− | <br> | + | {| border="1" |
− | '''The following is provided as a sample of how to configure a time zone:''' | + | |- |
+ | | | ||
+ | <code>[root@TB005375 ]# tzselect<br> Please identify a location so that time zone rules can be set correctly.<br> Please select a continent<br> 1) Africa<br> 2) Americas<br> .<br> .<br> .<br> 10) None - I want to specify the time zone using the Posix TZ format.<br> #?<span style="color:red">2</span><br> <br> Please select a country.<br> 1) Anguilla<br> .<br> .<br> .<br> 10) Canada<br> .<br> .<br> .<br> 51) Virgin Islands (US)<br> #?<span style="color:red">10</span><br> <br> Please select one of the time zone regions.<br> 1) Newfoundland Time, including SE Labrador<br> .<br> .<br> .<br> 7) Eastern Time - Quebec - most locations<br> .<br> .<br> .<br> 27) Pacific Time - north Yukon<br> #?<span style="color:red">7</span><br> <br> The following information has been given:<br> Canada<br> Eastern Time - Quebec - most locations<br> <br> Therefore TZ= ‘America/Montreal’ will be used.<br> Local time is now: Wed Aug 19 08:49:01 EDT 2009.<br> Universal time is now: Wed Aug 19 08:49:01 UDT 2009.<br> Is the above information OK?<br> 1) Yes<br> 2) No<br> #?<span style="color:red">1</span><br> <br> You can make this change permanent for yourself by appending the line<br> TZ= ‘America/Montreal’; export TZ<br> to the file ‘.profile’ in your home directory; then log out and log in again.<br> <br> Here is the TZ value again, this time on standard output so that you<br> can use the /usr/bin/tzselect command in the shell script<br> America/Montreal<br> [root@TB005373 ]#<br> </code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
+ | |||
+ | <br> The above set the timezone for the bash shell only. To configure the time system-wide, manually change the file /etc/localtime to point to the right timezone.<br> | ||
+ | |||
+ | '''$ rm /etc/localtime''' | ||
+ | |||
+ | '''$ ln -s /usr/share/zoneinfo/<Your Timezone> /etc/localtime'''<br> | ||
+ | |||
+ | Example: | ||
+ | |||
+ | '''$ ln -s /usr/share/zoneinfo/America/Fortaleza /etc/localtime''' | ||
+ | |||
+ | You can check for the correct timezone name inside that directory "/usr/share/zoneinfo/../..". | ||
+ | |||
+ | <br> '''You need to restart Toolpack for it to apply the changes.''' E.g. Timestamps in toolpack logs. |
Latest revision as of 03:44, 15 December 2011
The time zone of a Tmedia unit, such as the TMG800 or TMG3200, is configured on the Linux host using the tzselect
command.
The following is provided as a sample of how to configure a time zone:
NOTE: User-typed parameters are shown in red.
|
The above set the timezone for the bash shell only. To configure the time system-wide, manually change the file /etc/localtime to point to the right timezone.
$ rm /etc/localtime
$ ln -s /usr/share/zoneinfo/<Your Timezone> /etc/localtime
Example:
$ ln -s /usr/share/zoneinfo/America/Fortaleza /etc/localtime
You can check for the correct timezone name inside that directory "/usr/share/zoneinfo/../..".
You need to restart Toolpack for it to apply the changes. E.g. Timestamps in toolpack logs.