ntpd - How to change to eastern rather than central time?

This forum is for all other ARMv5 devices

ntpd - How to change to eastern rather than central time?

Postby greenman » Mon Apr 23, 2012 4:22 pm

When I do this:$this->bbcode_second_pass_code('', '[alarm]$ echo `date`
Mon Apr 23 11:14:38 CDT 2012')I get Central Daylight Savings Time. I'd like it to show Eastern.

When I try hwclock, I get this:$this->bbcode_second_pass_code('', '[alarm]$ hwclock --localtime
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
')It's basically the same for any hwclock argument except --help.

Any ideas how I can set the clock to Eastern?

When I try the debug this is what I get:$this->bbcode_second_pass_code('', '[alarm]$ hwclock --localtime --debug
hwclock from util-linux 2.21.1
hwclock: Open of /dev/rtc failed: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
')

FYI -- my ntpd.conf:$this->bbcode_second_pass_code('', '[alarm]$ more /etc/ntpd.conf
# $OpenBSD: ntpd.conf,v 1.7 2004/07/20 17:38:35 henning Exp $
# sample ntpd configuration file, see ntpd.conf(5)

# Addresses to listen on (ntpd does not listen by default)
#listen on 0.0.0.0
#listen on 127.0.0.1
#listen on ::1

# sync to a single server
#server ntp.example.org

# use a random selection of 8 public stratum 2 servers
# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
# servers pool.ntp.org
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
server 3.us.pool.ntp.org
[alarm]$
')

Cheers.
Last edited by greenman on Mon Apr 23, 2012 4:26 pm, edited 1 time in total.
POGO-B01
greenman
 
Posts: 24
Joined: Tue Apr 17, 2012 8:03 pm

Re: ntpd - How to change to eastern rather than central time

Postby WarheadsSE » Mon Apr 23, 2012 4:26 pm

I'm not being mean: lmgtfy
Basically:
$this->bbcode_second_pass_code('', '
mv /etc/localtime /etc/localtime-old
ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime
rc.d restart openntpd
')
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: ntpd - How to change to eastern rather than central time

Postby Kurlon » Mon Apr 23, 2012 4:28 pm

NTPd works on UTC time, your local system converts that to the local timezone you've chosen.

http://archlinuxarm.org/platforms/armv5 ... goflex-net covers setting the timezone for example.
Kurlon
 
Posts: 132
Joined: Fri Jan 06, 2012 10:05 pm

Re: ntpd - How to change to eastern rather than central time

Postby greenman » Mon Apr 23, 2012 4:43 pm

$this->bbcode_second_pass_quote('WarheadsSE', 'I')'m not being mean: lmgtfy
...


WarheadsSE, Thanks for your reply. I know you're not being mean. I spend most of my time on shared hosting where I rarely have to reason or opportunity to change the time. I greatly appreciate the lmgtfy link and its implied slap on the wrist. But I've absolutely learned something today. Your solution worked as predicted.

Incidentally, I did google it, and came up with this solution prior to posting:
http://www.hypexr.org/linux_date_time_help.php
It wasn't as helpful as your solution.

I'm not sure it explains the problems with hwclock though. Thanks again!
POGO-B01
greenman
 
Posts: 24
Joined: Tue Apr 17, 2012 8:03 pm

Re: ntpd - How to change to eastern rather than central time

Postby Kurlon » Mon Apr 23, 2012 4:46 pm

Most of these devices don't HAVE RTCs for hwclock to talk to.
Kurlon
 
Posts: 132
Joined: Fri Jan 06, 2012 10:05 pm

Re: ntpd - How to change to eastern rather than central time

Postby greenman » Mon Apr 23, 2012 5:20 pm

$this->bbcode_second_pass_quote('Kurlon', 'M')ost of these devices don't HAVE RTCs for hwclock to talk to.

Kurlon, thanks for your reply. I wrongly assumed it would have an rtc. I learned something new again today.
POGO-B01
greenman
 
Posts: 24
Joined: Tue Apr 17, 2012 8:03 pm

Re: ntpd - How to change to eastern rather than central time

Postby greenman » Wed Apr 25, 2012 1:39 pm

Using the above solution only works until reboot.
However, I found this informative page that explains how to change it permanently.
https://wiki.archlinux.org/index.php/Time

As root, in the file /etc/rc.conf, I edited the line:$this->bbcode_second_pass_code('', 'TIMEZONE="America/Chicago"')so that it reads:$this->bbcode_second_pass_code('', 'TIMEZONE="America/New_York"')Then I did: $this->bbcode_second_pass_code('', 'rm /etc/localtime
cp /usr/share/zoneinfo/America/New_York /etc/localtime')
Reboot and $this->bbcode_second_pass_code('', '[alarm]$ echo `date`
Wed Apr 25 09:31:24 EDT 2012
[alarm]')

I hope this will help another noob pplugger like myself in the future.

Cheers.
POGO-B01
greenman
 
Posts: 24
Joined: Tue Apr 17, 2012 8:03 pm


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 3 guests