Changing the timezone to GMT+1

Hello everyone,

Can you please help me with this problem?

I want to change the timezone of my Solaris 10 system. I found on internet that I should do the following steps:

1- Edit the /etc/TIMEZONE file

2- restart the system : init 6

My question is : In the file /etc/TIMEZONE I should modify this variable TZ=Africa/Casablanca but what value corresponds to "GMT+1" ?

Thank you.

Regards,

TZ=GMT+1 is for an area approximately 15 degrees east of Greenwich that does not observe daylight savings time. It would seem much better for you to ask the people who are asking you to change the timezone for this system where in the world they want this system to pretend to be located and choose a timezone for that location. We have no way to determine whether you should choose someplace in Europe, Africa, or maybe even Antartica.

Thank you for your answer. The server is located at Morocco. Morocco is moving to "summer time" which is GMT+1.
So the action is to move from GMT to GMT+1.

Is the editing of the /etc/TIMEZONE file the only action to do ?

I have found on internet : TZ=:GMT+1 with ":"

Any ideas ?

Thank you very much

Try: TZ=Africa/Casablanca
It should adjust to daylight savings time in morocco without a need to change anything when daylight savings time changes occur in the spring and fall.

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 :

TZ=:GMT+1

and

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.