Scripted method to change TZ from UTC to a specific timezone?
- From: "James Wu" <JWu@xxxxxxxxxxxxx>
- Date: Fri, 15 Oct 2010 11:45:27 -0400
Hi all,
When I run the cmd "date", I get UTC time on a fresh boot of an imaged
machine. I'd like to find a way to set the time to "America/New_York"
for automatically via script. A reboot is ok if absolutely needed but
not preferred.
I'm aware that I can run "dpkg-reconfigure tzdata" but that requires
user input.
I've tried the following methods without success:
"cp /usr/share/zoneinfo/America/New_York /etc/timezone" + changing
"UTC=yes to UTC=no" in /etc/default/rcS
I even tried rebooting afterwards
I've also tried "echo 'America/New_York' > /etc/timezone" as well
instead of copying.
Am I missing something? Is there another way to change the tzdata from
UTC without requiring user input?
Cheers,
James
- Follow-Ups:
- Re: Scripted method to change TZ from UTC to a specific timezone?
- From: Chris Davies
- Re: Scripted method to change TZ from UTC to a specific timezone?
- From: Bob Proulx
- Re: Scripted method to change TZ from UTC to a specific timezone?
- From: Boyd Stephen Smith Jr.
- Re: Scripted method to change TZ from UTC to a specific timezone?
- Prev by Date: Re: Debian Ciel -- A Theme Proposal for Squeeze
- Next by Date: Re: Debian Squeeze Boot-up stalls waiting for dhcp to obtain address
- Previous by thread: Re: Debian Ciel -- A Theme Proposal for Squeeze
- Next by thread: Re: Scripted method to change TZ from UTC to a specific timezone?
- Index(es):
Relevant Pages
|