Results 1 to 2 of 2
i am using fc3 OS i am writing a C application to first change timezone by creating link to respective timzone zonefile, then set time(time is input by user ) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-17-2012 #1
- Join Date
- Jun 2012
problem with DST TIMEZONES, NE HELP???????
i am writing a C application to first change timezone by creating link to respective timzone zonefile, then set time(time is input by user ) by first converting it to time since epoch by mktime() API then set time by settimeofday(). i am facing issues with timezones which have DST on like America/New_York. if i set time 5:00 with any America/New_York timezone then actual fetched on gettimeofday() and then converting using localtime_r() gives me 6:00. i suspect some DST correction is getting applied ? any clue how to avoid this?
- 06-17-2012 #2
"date" already does everything you describe.
My suggestion is to use it.
If you want to reimplement this tool, then get the source or devel package of "coreutils" and study the code.
Other than that: fc3 is from 2004. It is highly advised to update.
Last edited by Irithori; 06-17-2012 at 10:43 AM.You must always face the curtain with a bow.