LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 09-26-2008, 01:23 AM   #1
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Rep: Reputation: 30
Timzone Issues...Local Time versus UTC time?


Hello all,

Please help with a timezone issue.

Ok, my timezone is set to the following (EET) Eastern European Time) and Im located in Hungary.
Now, when I do a DATE -U command, it shows a GMT offset of +3. This is incorrect, because in the Summer time, its suppose to have an offset of +2.

I checked my etc/TIMEZONE directory and its currently set to
TZ= EET (since installation)


The offset SHOULD be +2 instead +3....in the Summer time.

How can I set this correctly? Please explain the details.
So in other words, I want to have Hungarian Local Time, with a GMT or UTC offset of +2...And +1 in the Winter time.

And how can I set this correctly when Daylight Savings comes again in the Fall (which should be +1) ????

Thx in advance.

Last edited by as400; 09-26-2008 at 01:24 AM.
 
Old 09-26-2008, 01:32 AM   #2
AuroraCA
Member
 
Registered: Jul 2008
Location: Northern CA USA
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370

Rep: Reputation: 35
What distribution and version of Linux are you using? There have been changes in timezone daylight savings/standard time dates which were incorporated in several updates to the Linux time tables. If you have not kept your Linux up-to-date then you may have discrepancies in the times. If you have not updated your Linux you should do so to incorporate the latest time tables.

Here is a wiki on how to fix time and timezones in Linux which I found using the terms "linux timezone" in Google.

http://www.wikihow.com/Change-the-Timezone-in-Linux
 
Old 09-26-2008, 02:36 AM   #3
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Its not Linux...Its Solaris 10 08/07 release. Thats why I posted this thread in the Solaris forum in the first place.

Also, is there any way I can issue a command to were I can set the UTC offset to +2 ??
All I want to do is to set the local time being Budapest, Hungary (Eastern Europe) and when issuing the date -u command, I want the UTC offset to be +2.

Please help.

Many thanks.

Last edited by as400; 09-26-2008 at 03:09 AM.
 
Old 09-26-2008, 03:31 AM   #4
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
I think I know whats going on here.
My TZ was set to EET which is like Romania (a bit more East of Hungary)...So Hungary would be set as this below and please correct me if Im wrong.

etc/TIMEZONE
TZ=CET
CMASK=022

Or....TZ=CEST

And this is what all I had to do??

Please confirm.


Now, will this creat a UTC offset of +2 in the summer time or +1?

Last edited by as400; 09-26-2008 at 03:33 AM.
 
Old 09-26-2008, 03:46 AM   #5
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,897

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
You can do this:
Code:
cd /usr/share/lib/zoneinfo/src
zic europe
Edit /etc/TIMEZONE and change TZ to Europe/Budapest
 
Old 09-26-2008, 04:33 AM   #6
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Thanks, I will give a try.
Now, so this also means that whrn the next DST changes take effecr which would be Fall, would this automatically convert UTC offset to +1 ???
 
Old 09-26-2008, 04:52 AM   #7
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,897

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Yes, this is supposed to do.
Maybe you have to install the latest DST patch in order to use the latest changes for various countries (note the link above is for the sparc patch)

Last edited by bathory; 09-26-2008 at 05:50 AM.
 
Old 09-26-2008, 05:06 AM   #8
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Im using Solaris 10 8/07. Does this release needs this patch at all for an X86?

And once I have the patch installation files downloaded, how can I install them? Please post the commands.

Thx.
 
Old 09-26-2008, 05:33 AM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,482

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
There was no recent change in European time zones I'm aware of so installing that patch isn't mandatory in your case.
 
Old 09-26-2008, 05:54 AM   #10
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Thanks...

And in this command below, do I have to add somewhere on there Budapest??? Or...only zic europe?

cd /usr/share/lib/zoneinfo/src
zic europe
 
Old 09-26-2008, 06:12 AM   #11
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,897

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Just "zic europe" is enough.
As for the patch jlliagre is right. It's not mandatory and it's only useful if you have to do with affected countries.
 
Old 09-26-2008, 11:43 AM   #12
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
One problem though...

I am dual-booting with Windows and once I change the time doing the DATE HHMM.SS under Solaris, like for example 18:00 CEST, then on Windows, the clock is displayed as 19:00...

And when I change the clock under Windows to 18:00, then under Solaris, its goes behind 17:00...

Why ??
 
Old 09-26-2008, 12:40 PM   #13
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Hi...Ok, I got it working...

The issue was...Well...Its my fault for not mentioning that Im dual-booting with Windows first of all....Sorry...

OK, I did the rtc -z Europe/Budapest command in order for the RTC to realize the INTERNAL clock so Windows and Solaris wont have to play a tug of war...

All is working now...

Thx.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timzone and daylight saving time jegra Linux - General 2 11-14-2007 05:02 AM
Time is not using local time but uses UTC acummings Debian 2 11-03-2007 01:58 PM
Change UTC to LOCAL TIME in etch?? slackass Debian 4 08-03-2007 05:39 PM
Cannot set time/date to other time zone than UTC (Kubuntu) jamangold Ubuntu 1 12-23-2005 05:42 PM
Re: UTC Time unixfreak Linux - Newbie 2 08-30-2004 02:09 PM


All times are GMT -5. The time now is 01:22 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration