Index: openacs-4/packages/ref-timezones/sql/postgresql/upgrade/upgrade-5.2.2-5.2.3b1.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ref-timezones/sql/postgresql/upgrade/upgrade-5.2.2-5.2.3b1.sql,v
diff -u -N
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/ref-timezones/sql/postgresql/upgrade/upgrade-5.2.2-5.2.3b1.sql	4 Jun 2006 00:45:55 -0000	1.2
@@ -0,0 +1,19 @@
+create or replace function timezone__add_rule (varchar, varchar, integer, varchar, varchar, varchar, varchar, varchar) returns integer as '
+declare
+  p_tz alias for $1;
+  p_abbrev alias for $2;
+  p_isdst_p alias for $3;
+  p_gmt_offset alias for $4;
+  p_utc_start alias for $5;
+  p_utc_end alias for $6;
+  p_local_start alias for $7;
+  p_local_end alias for $8;
+begin
+  insert into timezone_rules
+    (tz_id, abbrev, utc_start, utc_end, local_start, local_end, gmt_offset, isdst_p)
+  select timezone__get_id(p_tz), p_abbrev, rdbms_date(p_utc_start),
+    rdbms_date(p_utc_end), rdbms_date(p_local_start),
+    to_date(p_local_end),
+    p_gmt_offset,
+    case p_isdst_p when 0 then ''f'' else ''t''end;
+end;' language 'plpgsql';
