Forum OpenACS Q&A: Re: timezone usage

18: Re: timezone usage (response to 1)
Posted by Pedro Liska on
My script is ready! You may find it here

It uses the files in the /usr/share/zoneinfo directory and the zdump command to populate the timezones and timezone_rules OpenACS tables. I'm running Red Hat ES 3, and have not tested it in other Linux flavors.

I think it's a very useful utility and many users will want to use it. So hopefully someone will commit it to the OpenACS CVS tree.


-- Pedro

19: Re: timezone usage (response to 18)
Posted by Pedro Liska on
I've only tested the script in Oracle =(. Since I'm using an Oracle sequence, I think it just won't run in PostgreSQL. Or will it?
20: Re: timezone usage (response to 18)
Posted by Don Baccus on
What would be really helpful would be to modify the script to generate the data in sql/common, which was originally derived from the linux files. In this way fresh installs get the new data, and we can easily write an upgrade script to empty the table and reload it on a version upgrade.
21: Re: timezone usage (response to 20)
Posted by Pedro Liska on
You're right Don. I updated my script to generate such files: timezones.dat and timezones-rules.dat.

My goal was to get the current *.ctl files in ref-timezones package to be able to load my .dat files but I ran into a problem with generating the timezones-rules.dat file. I was not able to get Tcl's clock procs to format the date to "Mon DD YYYY HH:MI:SS" format. So you have to modify it's .ctl file to load it. The date is in the following format: "Dy Mon DD HH24:MI:SS YYYY".

I'm assuming PostgreSQL can also load such format but I have not tested that.

I uploaded the script to the same location than last time: