Scripted method to change TZ from UTC to a specific timezone?
- To: <firstname.lastname@example.org>
- Subject: Scripted method to change TZ from UTC to a specific timezone?
- From: "James Wu" <JWu@eyereturn.com>
- Date: Fri, 15 Oct 2010 11:45:27 -0400
- Message-id: <FFFA2CACDB4D5C44A24B09301138121801531322@ersbs2.eyereturn.local>
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:
/usr/share/zoneinfo/America/New_York /etc/timezone" + changing "UTC=yes to
UTC=no" in /etc/default/rcS
I even tried
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