LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-04-2013, 09:48 AM   #16
eloi
Member
 
Registered: Nov 2010
Posts: 195

Rep: Reputation: 50

I was using bios UTC time for years now (not dual booting), I've ignored till
now that Linux is not able to manage DST changes using bios localtime and that
it is posible set UTC in Windows.

I've found the windows registry entry you mention here:

https://wiki.archlinux.org/index.php...UTC_in_Windows

Good to know that.

Thanks Martinus2u!
 
Old 03-07-2013, 09:49 PM   #17
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,087

Original Poster
Rep: Reputation: 45
Ufff, dual booting, the first thing that occurred to Patrick, was responsible. Or rather my not choosing the proper timezone in Windows together with the fact that Windows was set to adjust time based on internet sources. My timezone (Windows) was Central Time (-6.00) when in fact mine is -3.00. That's why my clock led by exactly 3 hours!
 
Old 03-08-2013, 02:48 AM   #18
eloi
Member
 
Registered: Nov 2010
Posts: 195

Rep: Reputation: 50
Central Time is US Central (i.e. Texas):

Code:
$ TZ=US/Central date ; TZ=America/Argentina/Buenos_Aires date
Fri Mar  8 02:44:30 CST 2013
Fri Mar  8 05:44:30 ART 2013
$
 
Old 03-08-2013, 04:28 AM   #19
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,087

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by eloi View Post
Central Time is US Central (i.e. Texas):

Code:
$ TZ=US/Central date ; TZ=America/Argentina/Buenos_Aires date
Fri Mar  8 02:44:30 CST 2013
Fri Mar  8 05:44:30 ART 2013
$
Can you explain the meaning of ART? It seems Locale's full weekday name, 24-hour and minute, HH:MM:SS by the man page but in that case I do not understand CST.
 
Old 03-08-2013, 06:38 AM   #20
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,008

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
The three-character abbreviations are the time zone; in the conterminous US, there is Eastern, Central, Mountain and Pacific, there is Standard time and Daylight time and there is Time: thus, EST, CST, MST and PST during "normal" months and EDT, CDT, MDT and PDT during "daylight savings" months (Alaska and Hawaii are far west of those zones, they abbreviate as AKST and HAST).

The ART is simply the country code (AR) and Time (seems like Argentine only has one time zone?).

"Wide" countries have multiple time zone and the three- or more character codes are just a way to keep things on track. The basic rule is that every 10 degrees east or west of Greenwich is one hour; that's not political, it's physical. The way the time zone are carved out, though, is political (look at a world time zone map and you'll see that -- no straight lines there). This one is kind of cute: http://www.timeanddate.com/time/map/. There are places on the planet where some time zones are in half-hours (gotta wonder about that).

And all along, Windows had your clock screwed up. Oh, well.

Hope this helps some.

Last edited by tronayne; 03-08-2013 at 06:40 AM.
 
1 members found this post helpful.
Old 03-08-2013, 04:27 PM   #21
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 343

Rep: Reputation: 56
Quote:
Originally Posted by eloi View Post
I was using bios UTC time for years now (not dual booting), I've ignored till
now that Linux is not able to manage DST changes using bios localtime and that
it is posible set UTC in Windows.

I've found the windows registry entry you mention here:

https://wiki.archlinux.org/index.php...UTC_in_Windows

Good to know that.

Thanks Martinus2u!
Thanks for the find. It's been a while since I've dual-booted.
 
Old 03-08-2013, 05:15 PM   #22
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,087

Original Poster
Rep: Reputation: 45
Argentina has two different times since some years now. And since about the same time we do not have daylight time. But should not the fact that we use standard time be reflected in 'ART', and be 'ARST'?

A remark that comes to my mind is, why so few man pages speak about the format of the command output? Example, 'date'.
 
Old 03-09-2013, 11:24 AM   #23
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
stf92,

Try the opposite settings than suggested by eloi in post #11.

The Linux thing

I don’t bother too much with the time settings in BIOS.

When I run timeconfig I choose the option „Hardware clock is set to UTC” and I set the right time zone („Europe/Warsaw” in my case though „Europe/Paris” does the same – sets the time to the Central European one). Then I use date command to set the right date and time. Finally I run hwclock --systohc command to write the right time to BIOS.

In /etc/rc.d/rc.local_shutdown I set the same command:

Code:
# save time
/sbin/hwclock --systohc
In /etc/rc.d/rc.local I set the commands:

Code:
# adjust time
/sbin/hwclock --adjust ; /sbin/hwclock --hctosys
When I need to change the time I use the mentioned date and hwclock --systohc commands.

I don’t bother with --utc and --localtime switches because hwclock recognizes the valid settings using /etc/hardwareclock file.

The Windows thing

When you use dual booting with Linux and Windows the latter system spoils the time at the turn from the summer to winter and from the winter to summer (Widows makes the correction already made by Linux). To disable that find in Windows the time settings and switch off the correction for the summer/winter time.

The time thing

To check the right time in the different time zones use the following site:

http://www.timeanddate.com/library/a...ons/timezones/

The date thing

Quote:
Originally Posted by stf92 View Post
A remark that comes to my mind is, why so few man pages speak about the format of the command output? Example, 'date'.
What’s missing in the man date in your opinion?

Last edited by w1k0; 03-09-2013 at 11:38 AM. Reason: typos
 
Old 03-09-2013, 11:46 AM   #24
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,087

Original Poster
Rep: Reputation: 45
I'm not quite done with this problem it seems, and for the moment I made this: Went to windows and disabled the network thing, leaving daylight disabled too. Now I'm waiting to have stable symptoms before I take any measure.

As to your advices, I'll try them later, not now as I have said. The saving of system time to the hw clock at shutdown, I think the OS does it by default, but I'll have an eye on it.

"What’s missing in the man date in your opinion?": Maybe I should know the meaning of ART but could not the manual say a word about the way the output specifies the country code and daylight condition?
 
Old 03-09-2013, 12:44 PM   #25
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
stf92

The date command reports the time zone (“CET” in the following example).

date
Code:
Sat Mar  9 19:30:00 CET 2013
It doesn’t display country/region because different countries or regions use the same time zone – for example CET/CEST is used in France, Germany, Poland etc.

To display the time and the date in the different time zones use my script:

time+date
Code:
#!/bin/bash

# time+date: displays zone name, time, and date for the given time zone

# use abbreviations such as:    CET or CEST
# or coutry names such as:      Poland
# or region/city names such as: Europe/Warsaw
# or GMT offsets such as:       GMT-02

if [ "$1" == "" ]
then
cat <<EOF
time+date: displays zone name, time, and date for the given time zone

time+date [ZONE | Country | Region/City | GMT±n] [-l | --local]
          (see: /usr/share/zoneinfo directory)

for example:
           CET or CEST
           Poland
           Europe/Warsaw
           GMT-02
EOF
    exit
fi

if [ "$2" == "-l" ] || [ "$2" == "--local" ]
then
    NOW=`date +"%Z %H:%M %m-%d"`
    echo $NOW
fi

TIME=`TZ="$1" date +"%Z %H:%M %m-%d"`
echo $TIME
For example:

time+date America/Buenos_Aires
Code:
ART 15:30 03-09
or:

time+date America/Buenos_Aires -l
Code:
CET 19:30 03-09
ART 15:30 03-09
(In the above example the first line displays the local time.)

Avoid time zones abbreviations because they are sometimes ambiguous and – as a result – display invalid values:

time+date ART
Code:
ART 18:30 03-09
To display the daylight conditions use the command:

zdump -v ART
Code:
ART  Fri Dec 13 20:45:52 1901 UTC = Fri Dec 13 20:45:52 1901 ART isdst=0 gmtoff=0
ART  Sat Dec 14 20:45:52 1901 UTC = Sat Dec 14 20:45:52 1901 ART isdst=0 gmtoff=0
ART  Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 03:14:07 2038 ART isdst=0 gmtoff=0
ART  Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 03:14:07 2038 ART isdst=0 gmtoff=0
or the command:

zdump -v America/Buenos_Aires
Code:
America/Buenos_Aires  Fri Dec 13 20:45:52 1901 UTC = Fri Dec 13 16:29:04 1901 CMT isdst=0 gmtoff=-15408
America/Buenos_Aires  Sat Dec 14 20:45:52 1901 UTC = Sat Dec 14 16:29:04 1901 CMT isdst=0 gmtoff=-15408
.
.
.
America/Buenos_Aires  Sun Mar 16 01:59:59 2008 UTC = Sat Mar 15 23:59:59 2008 ARST isdst=1 gmtoff=-7200
America/Buenos_Aires  Sun Mar 16 02:00:00 2008 UTC = Sat Mar 15 23:00:00 2008 ART isdst=0 gmtoff=-10800
America/Buenos_Aires  Sun Oct 19 02:59:59 2008 UTC = Sat Oct 18 23:59:59 2008 ART isdst=0 gmtoff=-10800
America/Buenos_Aires  Sun Oct 19 03:00:00 2008 UTC = Sun Oct 19 01:00:00 2008 ARST isdst=1 gmtoff=-7200
America/Buenos_Aires  Sun Mar 15 01:59:59 2009 UTC = Sat Mar 14 23:59:59 2009 ARST isdst=1 gmtoff=-7200
America/Buenos_Aires  Sun Mar 15 02:00:00 2009 UTC = Sat Mar 14 23:00:00 2009 ART isdst=0 gmtoff=-10800
America/Buenos_Aires  Mon Jan 18 03:14:07 2038 UTC = Mon Jan 18 00:14:07 2038 ART isdst=0 gmtoff=-10800
America/Buenos_Aires  Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 00:14:07 2038 ART isdst=0 gmtoff=-10800
(The output was too long to quote it all.)
 
1 members found this post helpful.
Old 03-09-2013, 12:53 PM   #26
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: ElementaryOS, Ubuntu LTS, Slackware
Posts: 1,511

Rep: Reputation: 699Reputation: 699Reputation: 699Reputation: 699Reputation: 699Reputation: 699
Quote:
Originally Posted by stf92 View Post
As to your advices, I'll try them later, not now as I have said.
There is a tide in the affairs of men.
Which, taken at the flood, leads on to fortune;
Omitted, all the voyage of their life
Is bound in shallows and in miseries.
On such a full sea are we now afloat,
And we must take the current when it serves,
Or lose our ventures.

(William Shakespeare, Julius Caesar)
 
Old 03-09-2013, 01:01 PM   #27
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,087

Original Poster
Rep: Reputation: 45
I do not want to look at the book now, but that must refer to Casius, or Casius trying to convince Brutus. Anything to do with the thread? Oh, now I got it!
 
Old 03-09-2013, 01:05 PM   #28
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by stf92 View Post
As to your advices, I'll try them later, not now as I have said.
Your later is my now:

time+date America/Buenos_Aires -l
Code:
CET 20:05 03-09
ART 16:05 03-09
 
Old 03-09-2013, 01:07 PM   #29
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,087

Original Poster
Rep: Reputation: 45
Very good.
 
Old 03-09-2013, 01:14 PM   #30
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by stf92 View Post
The saving of system time to the hw clock at shutdown, I think the OS does it by default, but I'll have an eye on it.
You’re right: /etc/rc.d/rc.0 and /etc/rc.d/rc.6 do that. My settings are very old. Probably in those old times the system didn’t save the system time to the hardware clock so I had to do that. Or maybe I just doubled the default settings in /etc/rc.d/rc.local_shutdown unconsciously.
 
  


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
utc-time 2 hours off dranach Debian 9 08-20-2010 07:30 PM
Fedora lags, CPU 8- - 90% almost all the time... QueenZ Fedora 1 03-03-2009 02:42 PM
time on our RH linux FTP server is four hours ahead, but desktop time is correct?? dgr Linux - Newbie 10 10-09-2007 05:42 AM
Time goes back 4 hours on every boot lagartoflojo Slackware 8 04-06-2005 08:28 AM
After restart time jumps 7 hours mlbaker Linux - General 4 03-22-2003 11:19 AM


All times are GMT -5. The time now is 12:51 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