This is a discussion on Time Zone within the AIX Operating System forums, part of the Unix Operating Systems category; --> Guys, Is it possible to have two Time Zone's in one server . If yes, how it can be ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| When you log in, the system sets environment variables from the environment file before reading your login profile, .profile. TZ The time-zone information. The TZ environment variable is set by the /etc/environment file. The TZ environment variable has the following format (spaces inserted for readability): std offset dst offset , rule The fields within the TZ environment variable are defined as follows: std and dst Designate the standard (std) and summer (dst) time zones. Only the std value along with the appropriate offset value is required. If the dst value is not specified, summer time does not apply. The values specified may be no less than three and no more than TZNAME_MAX bytes in length. The length of the variables corresponds to the %Z field of the date command; for libc and libbsd, TZNAME_MAX equals three characters. Any nonnumeric ASCII characters except the following may be entered into each field: a leading : (colon), a , (comma), a - (minus sign), a + (plus sign), or the ASCII null character. Note: POSIX 1.0 reserves the leading : (colon) for an implementation-defined TZ specification. AIX disallows the leading colon, selecting CUT0 and setting the %Z field to a null string. An example of std and dst format is as follows: EST5EDT EST Specifies Eastern U.S. standard time. 5 Specifies the offset, which is 5 hours behind Coordinated Universal Time (CUT). EDT Specifies the corresponding summer time zone abbreviation. Note: See "Time Zones" for a list of time zone names defined for the system. offset Denotes the value added to local time to equal Coordinated Universal Time (CUT). CUT is the international time standard that has largely replaced Greenwich Mean Time. The offset variable has the following format: hh:mm:ss The fields within the offset variable are defined as follows: hh Specifies the dst offset in hours. This field is required. The hh value can range between the integers -12 and +11. A negative value indicates the time zone is east of the prime meridian; a positive value or no value indicates the time zone is west of the prime meridian. mm Specifies the dst offset detailed to the minute. This field is optional. If the mm value is present, it must be specified between 0 and 59 and preceded by a : (colon). ss Specifies the dst offset detailed to the second. The ss field is optional. If the ss value is present, it must be specified between 0 and 59 and preceded by a : (colon). An offset variable must be specified with the std variable. An offset variable for the dst variable is optional. If no offset is specified with the dst variable, the system assumes that summer time is one hour ahead of standard time. As an example of offset syntax, Zurich is one hour ahead of CUT, so its offset is -1. Newfoundland is 1.5 hours ahead of eastern U.S. standard time zones. Its syntax can be stated as any of the following: 3:30, 03:30, +3:30, or 3:30:00. rule The rule variable indicates when to change to and back from summer time. The rule variable has the following format: start/time,end/time The fields within the rule variable are defined as follows: start Specifies the change from standard to summer time. end Specifies the return to standard time from summer time. time Specifies when the time changes occur within the time zone. For example, if the time variable is encoded for 2 a.m. then the time changes when the time zone reaches 2 a.m. on the date specified in the start variable. / Delimits the start date, end date, and time variables. , (Comma) Delimits two date and time pairs. The start and end variables support a syntax for Julian time (J) and a syntax for leap years (M): Jn Mm.n.d In the J syntax, the n variable has the value of 1 through 365. Leap days are not counted. In the M syntax, m is the month, n the week, and d the day of the week starting from day 0 (Sunday). The rule variable has the same format as the offset variable except no leading - (minus sign) or + (plus sign) is allowed. The default of the start variable is 02:00:00 (2 a.m.). Note: The time zone offsets and time change points are interrelated and context-dependent. The rule variable's runtime execution semantics change as a function of the offsets. For example, if the summer time zone changes one hour, as in CST6CDT5, (the default 2 a.m.) summer time changes instantaneously from 2 a.m. to 3 a.m. CDT. The fall change is from 2 a.m. CDT to 1 a.m. CST. The respective changes for a time zone of CST6CDT4 are 2 a.m. CST to 4 a.m. CDT and 2 a.m. CDT to 12 a.m. CST. In an example of the rule variable, if the law changed so that the Central United States experienced summer time between Julian 129 and Julian 131, the TZ variable would be stated as follows: TZ=CST6CDT5,J129,J131 In this example, the dates indicated are May 09 and May 11,1993, respectively. (Use the date +%j command to get the Julian date number.) In another example, if the time changes were to occur at 2 a.m. CST and 19:30 CDT, respectively, the variables would be stated as follows: TZ=CST6CDT5,J129,J131/19:30 In nonleap years, the fallback time change would be from 19:30 CDT to 18:30 CST on May 11 (1993). For the leap year (M) syntax, the spring ahead date would be 2 May and the fallback date is 9 May. The variables are stated as follows: TZ=CST6CDT5,M5.1.0,M5.2.0 Time Zones The system defines the following time zones and time zone names: Note: Coordinated Universal Time (CUT) is the international time standard. |
| |||
| yes you need to change the /etc/environment look at this link http://www.unet.univie.ac.at/aix/fil...nvironment.htm |
| |||
| "Lakshmikanth Putti" <kanth.it@gmail.com> wrote: >yes you need to change the /etc/environment > >look at this link >http://www.unet.univie.ac.at/aix/fil...nvironment.htm Depends what you want to achieve. The TZ in /etc/environment is the default for the server. If a user needs to run in a different timezone they can set their own TZ variable in their .profile. This will only affect interpretation of time for their session (all times are actually stored in UTC). Ted. ================================================== ============ | Ted Linnell <edlinnell@acslink.net.au> | | | | Nunawading, Victoria , Australia | ================================================== ============ |