I really need your help on a job of setting timezone and time on a router using Linux OS remotely from Web ( Linux OS based on Linux Kernel 2.6.30).
For fulfilling this job, I use CGI and Shellscript. Below are steps:
- Get Time, Timezone info from Browser
- Execute CGI to set time (using C)
- CGI executes Timezone_Setting shellscript
Here is what I'm doing for the script in step 3:
The parameter($1) is one of the following string (A):
"GMT-12", "GMT-11", "GMT-10",..."GMT", "GMT+1",.. "GMT+12".
It seems that I can use the following to set timezone:
ln -sf /usr/share/zoneinfo/Japan /etc/localtime
1) Am I doing the right way?
2) How can I use the command above with my A strings correctly?
Note: In the above command, "Japan" is one of the files in my "/usr/share/zoneinfo" directory. And I can do a conversion before using the command like:
"GMT-9" <-> Japan "GMT-5" <-> EST ( etc. )
but It seems not the good solution.