Setting time zone in dd-wrt

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
pauldmis
DD-WRT User


Joined: 01 May 2008
Posts: 77

PostPosted: Thu Sep 03, 2009 22:08    Post subject: Setting time zone in dd-wrt Reply with quote
I notice the time zone is set to UTC. How would I set the time zone to something different? I also live in one of those areas that doesn't follow daylight savings time.
Sponsor
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1258
Location: Ohio USA

PostPosted: Thu Sep 03, 2009 22:29    Post subject: Reply with quote
Bottom of the Setup page, change the Time Zone.
_________________
(05/02/17) std - 31924
Linksys WRT400N
Buffalo WHR-G300N

Got OpenDNS?
pauldmis
DD-WRT User


Joined: 01 May 2008
Posts: 77

PostPosted: Thu Sep 03, 2009 22:32    Post subject: Reply with quote
All of the select able time zones are UTC, there are no other time zones like PST, MST, MDT, GMT, etc...
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1258
Location: Ohio USA

PostPosted: Thu Sep 03, 2009 22:43    Post subject: Reply with quote
UTC-05:00 = EST
UTC-08:00 = PST

etc...

http://www.timeanddate.com/library/abbreviations/timezones/

_________________
(05/02/17) std - 31924
Linksys WRT400N
Buffalo WHR-G300N

Got OpenDNS?
pauldmis
DD-WRT User


Joined: 01 May 2008
Posts: 77

PostPosted: Thu Sep 03, 2009 22:45    Post subject: Reply with quote
Luniz2k1 wrote:
UTC-05:00 = EST
UTC-08:00 = PST

etc...


Yes I'm aware of that, however I have a command that complains about the time being incorrect, though it is the correct time, it want the date to reflect PST, EST, etc and not UTC.
pauldmis
DD-WRT User


Joined: 01 May 2008
Posts: 77

PostPosted: Thu Sep 03, 2009 22:49    Post subject: Reply with quote
My time is set to Thu Sep 3 15:47:05 UTC 2009

Which is my current time, the problem is date reports UTC and I need it to report MST
Luniz2k1
DD-WRT Guru


Joined: 04 Oct 2007
Posts: 1258
Location: Ohio USA

PostPosted: Thu Sep 03, 2009 22:52    Post subject: Reply with quote
pauldmis wrote:
Yes I'm aware of that, however I have a command that complains about the time being incorrect, though it is the correct time, it want the date to reflect PST, EST, etc and not UTC.

And what command would that be? What is the issue with changing the time zone in the router to UTC-07:00?

MST = UTC-07:00

_________________
(05/02/17) std - 31924
Linksys WRT400N
Buffalo WHR-G300N

Got OpenDNS?
pauldmis
DD-WRT User


Joined: 01 May 2008
Posts: 77

PostPosted: Thu Sep 03, 2009 22:53    Post subject: Reply with quote
I can do the following

alias date="date | sed 's,UTC,MST,g'"

This sets an alias for date to change UTC to MST, but this is a hack.
pauldmis
DD-WRT User


Joined: 01 May 2008
Posts: 77

PostPosted: Thu Sep 03, 2009 22:54    Post subject: Reply with quote
Actually that alias didn't work, I get an error still:

"needs an accurate clock to work correctly. Please check your time and date settings!"
Mordak
DD-WRT Guru


Joined: 27 Dec 2007
Posts: 933
Location: Lee, Me

PostPosted: Fri Sep 04, 2009 0:13    Post subject: Reply with quote
It also help if you use an internet time server. There are public time servers found here: http://support.ntp.org/bin/view/Servers/NTPPoolServers Also, chech here for a list on the right hand side choose your continent: http://www.pool.ntp.org/
_________________

ASUS AC3200
Linksys WRT32X
Linksys WRT3200 ACM
pauldmis
DD-WRT User


Joined: 01 May 2008
Posts: 77

PostPosted: Fri Sep 04, 2009 7:05    Post subject: Reply with quote
Notice I get different output when invoking the date command in two ways

root@router1:/# date
Fri Sep 4 00:03:19 UTC 2009
root@router1:/# TZ=UTC1MST date
Fri Sep 4 00:03:23 MST 2009
pauldmis
DD-WRT User


Joined: 01 May 2008
Posts: 77

PostPosted: Fri Sep 04, 2009 7:07    Post subject: Reply with quote
This works

root@router1:/# export TZ=UTC1MST
root@router1:/# date
Fri Sep 4 00:07:11 MST 2009
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Fri Sep 04, 2009 13:08    Post subject: Reply with quote
I would then advice to do this:

Code:
#!/bin/sh
echo "export TZ=UTC1MST" >>/tmp/root/.profile

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
pauldmis
DD-WRT User


Joined: 01 May 2008
Posts: 77

PostPosted: Fri Sep 04, 2009 22:43    Post subject: Reply with quote
frater wrote:
I would then advice to do this:

Code:
#!/bin/sh
echo "export TZ=UTC1MST" >>/tmp/root/.profile


Thanks... already did it when I posted my last comment.
crashfly
DD-WRT Guru


Joined: 24 Feb 2009
Posts: 2026
Location: Sol System > Earth > USA > Arkansas

PostPosted: Fri Sep 04, 2009 23:02    Post subject: Reply with quote
Quote:
#!/bin/sh
echo "export TZ=UTC1CST" >>/tmp/root/.profile

I assume one would change the "UTC1MST" to "UTC1CST" to get it to read as 'Central Standard Time'?

_________________
E3000 22200M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]

Try Dropbox for syncing files - get 2.5gb online for free by signing up.

Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum