Sponsored Content
Operating Systems Solaris Changing the timezone to GMT+1 Post 302799345 by Don Cragun on Friday 26th of April 2013 11:03:06 AM
Old 04-26-2013
Quote:
Originally Posted by adilyos
It's already on : TZ=Africa/Casablanca

should we change TZ=Africa/Casablanca to TZ=:GMT+1 ?

Thank you

---------- Post updated at 08:28 AM ---------- Previous update was at 07:29 AM ----------

What's the difference between :
Code:
TZ=:GMT+1

and
Code:
TZ=:Etc/GMT-1

?

Thank you
You should not change TZ=Africa/Casablanca to anything else. The whole idea behind having a database for Casablanca is that it should know the daylights savings time changes that have occurred at least since 1970 (and if you keep the database up-to-date) will also know about the most recent daylight savings start and stop time rules put in place by the Moroccan government (including the fact that daylight savings time is suspended during Ramadan in Morocco; so Morocco has 4 timezone shifts per year while most of the United States and Europe have 2 timezone shifts per year). TZ=GMT-1 will interpret ALL times it encounters as 1 hour ahead of Greenwich and TZ=GMT+1 will interpret ALL times as 1 hour behind Greenwich time. I don't have access to a Solaris 10 system and won't try to predict what TZ=:GMT+1 or TZ=:Etc/GMT-1 will do. The difference between TZ=GMT-1 and TZ=GMT+1 is two hours and neither of them will correctly show the timestamps on files both before and after the switch to or from daylignt savings times. (The TZ setting also affects the display of dates in other utilities like ls -l output and the ways dates and times are calculated by the touch utility.) Using any TZ rule that ignores the daylight savings time shifts will always incorrectly display a timestamps set during the opposite setting. (This also means that if you still choose to perform manual shifts to TZ, you need to reset TZ and reboot your system at exactly the times when when the daylight shifts occur.)

If you haven't been installing updates to Solaris 10 from Oracle and you haven't manually updated your timezone database from the timezone database creators, I won't try to predict what will happen when daylight savings time shifts occur.

If you are going to do manual shifts rather than using your timezone database, at least use TZ=WET0 and TZ=WEST-1 so date will correctly show the Western European Time and Western European Summer Time abbreviations for current times.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

TimeZone changing in Solaris

I've date back one of my Unix WS ,after that again i want to return to real date,but after running: # date -u mmddHHMMyy the clock immediately returns to GMT timezone that is different with my local timezone. any suggestion could be useful... tanx --nikk (2 Replies)
Discussion started by: nikk
2 Replies

2. Shell Programming and Scripting

Help me about gmt scripts

does somebody know GMT mapping? please reply (2 Replies)
Discussion started by: SANGUINE
2 Replies

3. Shell Programming and Scripting

GMT to PST

I have a file which is tab delimited, it contains the GMT date. Please tell me how to convert from GMT to PST time and if the date and time is of 2 days ago from the current date store the lines in a file or else remove the line. 10.1.10.178 - - - 10.1.10.178 - - ... (2 Replies)
Discussion started by: sandy1028
2 Replies

4. Red Hat

changing timezone

Hi, I would like to change time zone Linux from IST to US/Canada but not getting the option , I have run the command setup -> timezone configuration but not getting the option of us/canada or pacific us/canada. Please suggest. Regards, Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies

5. UNIX for Dummies Questions & Answers

GMT to PST

99.60.97.205 - - GET /2009-03-29/world/impact.row.atlantic_1_rower-paul-ridley-cancer-research?_s=PM:WORLD HTTP/1.1 200 9386 www.abc.com Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 ... (4 Replies)
Discussion started by: sandy1028
4 Replies

6. Solaris

[Solved] Question changing timezone rules / zic

Dear, One of our customer which is located in Iraq/Baghdad, has informed us about a official change in daylight saving time in few days later and has asked us to fix this issue. So, the current timezone of that system is set as 'Asia/Baghdad' which is correct. however to fix the issue I went... (0 Replies)
Discussion started by: Anti_Evil
0 Replies

7. Shell Programming and Scripting

GMT to MST timestamp conversion

Hi Team, We have written a perl script to perform the GMT to MST timestamp conversion. Input: 2013-12-01T05:23:19.374 Output: need the given timestamp in MT (MST/MDT) #!/usr/bin/perl use strict; use warnings; use Time::Local; #always gmt #my $tval = '2013-12-01T05:23:19.374'; ... (4 Replies)
Discussion started by: kmanivan82
4 Replies

8. Red Hat

Changing java timezone on RHEL 5

Hi all, I faced with some problem when I changing java timezone on RHEL 5. I used tzupdater.jar tool from oracle to update java timezone. But I missed stopping applications before I run tzupdater tool. So some applications working with wrong timezone. I think there's some cached instance of... (0 Replies)
Discussion started by: sembii
0 Replies

9. Solaris

Changing only time zone file not the timezone without reboot

Hello all, I just want to update the timezone file with new file to update the time, so the zone in /etc/TIMEZONE will be the same but the file it refers to will be changed, and the local time should be changed, can this take effect without rebooting Solaris 10? (9 Replies)
Discussion started by: Amr.Es
9 Replies
timezone(5)							File Formats Manual						       timezone(5)

NAME
timezone, dst - difference between Universal (Greenwich mean) time and Local time VALUES
Default A default value of indicates that the default value for the timezone tunable (420 minutes west of Greenwich, England ) is to be interpreted as a daylight savings time value. Allowed values The value for the tunable should correspond to a defined time zone, and thus should be at least a multiple of 15 minutes. More commonly the value will be a multiple of 60 or 30 minutes, corresponding to an hour or half-hour time zone. The value of the tunable specifies if the time is with daylight savings or not. When the value is set to then the system is using daylight savings time, and if it is set to the system is not. Recommended values Any allowed value is equally recommended. However, the chosen value should correspond to the time zone and daylight saving scheme of the system site or to a time zone and daylight saving scheme which has meaning for applications or users. DESCRIPTION
The tunable is the difference between Greenwich mean time (Universal Time) and local time, expressed as minutes west of Greenwich, England. The tunable indicates whether the tunable is to be interpreted as a standard or daylight savings time value. These tunables provide a way to convert between Grenwich Mean Time (or Universal Time) and local time. Although is a tunable, it is not used to affect the behavior of the system. Rather, it is used to remember time zone information when the system is rebooted. This infor- mation is returned by under HP-UX extensions. The tunable is independent of other methods of indicating time zones. For example, gets or sets the time in either Universal or local time by using the environment variable. In this case the tunable has no effect. In general, it is best to refer to the manpages for specific system calls such as and to check if there is a dependency on the tunable. Who Is Expected to Change This Tunable? Anyone. Restrictions on Changing Changes to these tunables take effect at the next reboot. When Should the Value of This Tunable Be Changed? These tunables may be changed to match the system's geographic time zone or the time zone of users. What Other Tunable Values Should Be Changed at the Same Time? The and tunables should always be set and interpreted as a pair of values. WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of HP-UX. Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation, some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun- able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was factory installed on your system, see at AUTHOR
and were developed by HP. Tunable Kernel Parameters timezone(5)
All times are GMT -4. The time now is 11:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy