Jump to content

Set time to users


Recommended Posts

I want a user to have a time different from the system one. Since the user access through ssh from east coast while the machine is on the westcoast I wonder if there is a way to set up an individual time (sys +3hrs).

 

Can anyone tell me how to do this? I suggest it would be something on the bashrc file.

Link to comment
Share on other sites

In ~/.bash_profile put something like this:

 

TZ=America/New_York

export TZ

 

if the user is in the eastern time zone, regardless of what timezone the system has set. The 'America/New_York is the time zone as depicted relative to /usr/share/zoneinfo

Example of timezones:

< omar ~ > cd /usr/share/zoneinfo/
< omar /usr/share/zoneinfo > ls America/*
America/Adak           America/Dawson_Creek  America/Los_Angeles     America/Rankin_Inlet
America/Anchorage      America/Denver        America/Louisville      America/Recife
America/Anguilla       America/Detroit       America/Maceio          America/Regina
America/Antigua        America/Dominica      America/Managua         America/Rio_Branco
America/Araguaina      America/Edmonton      America/Manaus          America/Rosario

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...