]> de.git.xonotic.org Git - xonotic/xonstatdb.git/commitdiff
Use UTC timestamps instead of local timestamps.
authorAnt Zucaro <azucaro@gmail.com>
Wed, 16 Nov 2011 20:22:49 +0000 (15:22 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Wed, 16 Nov 2011 20:22:49 +0000 (15:22 -0500)
tables/achievements.tab
tables/db_version.tab
tables/games.tab
tables/hashkeys.tab
tables/maps.tab [changed mode: 0644->0755]
tables/player_nicks.tab
tables/player_weapon_stats.tab
tables/players.tab
tables/servers.tab

index a5006a4ee03d0222dbc260c6283755bfb57aae33..139e777bdfa7e18f757db36478ae16a8784eb485 100644 (file)
@@ -3,7 +3,7 @@ CREATE TABLE xonstat.achievements
   achievement_id serial NOT NULL,
   achievement_cd integer NOT NULL,
   player_id integer NOT NULL,
-  create_dt timestamp without time zone NOT NULL DEFAULT now(),
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
   CONSTRAINT achievements_pk PRIMARY KEY (achievement_id),
   CONSTRAINT achievements_fk001 FOREIGN KEY (achievement_cd)
       REFERENCES xonstat.cd_achievement (achievement_cd) MATCH SIMPLE
index 90d895592f361a05937e2c20e589317e9b44f6f7..967fcc6c7a34b61b2d7ccfff99718cf2c6c59bcb 100644 (file)
@@ -2,7 +2,7 @@ CREATE TABLE xonstat.db_version
 (
   "version" character varying(15) NOT NULL,
   descr character varying(100) NOT NULL,
-  create_dt timestamp without time zone NOT NULL DEFAULT now(),
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
   CONSTRAINT db_version_pk PRIMARY KEY (version)
 )
 WITH (
index c2e3056eb5d3de74b161d7c154c431ce951939da..fe76771cfbf28d1183a47689c211615a7791ad06 100644 (file)
@@ -7,7 +7,7 @@ CREATE TABLE xonstat.games
   map_id integer NOT NULL,
   duration interval,
   winner integer,
-  create_dt timestamp without time zone NOT NULL DEFAULT now(),
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
   CONSTRAINT games_pk PRIMARY KEY (game_id),
   CONSTRAINT games_fk001 FOREIGN KEY (game_type_cd)
       REFERENCES xonstat.cd_game_type (game_type_cd) MATCH SIMPLE
index 3e869db6eb0467b8e6bd77d1268399cf3b22482d..1f0243d5b4bcb079f575d7f6b570f46cf0d9a9d9 100644 (file)
@@ -3,7 +3,7 @@ CREATE TABLE xonstat.hashkeys
   player_id integer NOT NULL,
   hashkey character varying(44) NOT NULL,
   active_ind boolean NOT NULL DEFAULT true,
-  create_dt timestamp without time zone NOT NULL DEFAULT now(),
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
   CONSTRAINT hashkeys_pk PRIMARY KEY (player_id, hashkey),
   CONSTRAINT hashkeys_fk001 FOREIGN KEY (player_id)
       REFERENCES xonstat.players (player_id) MATCH SIMPLE
old mode 100644 (file)
new mode 100755 (executable)
index dda0ff4..a186a4e
@@ -5,6 +5,7 @@ CREATE TABLE xonstat.maps
   "version" integer NOT NULL DEFAULT 1,
   pk3_name character varying(100),
   curl_url character varying(300),
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
   CONSTRAINT maps_pk PRIMARY KEY (map_id)
 )
 WITH (
index d80c8dd242c4d19ffcfb0c809479fc1271abd523..6a42088040fb5836d0fa70ae15f70a3d2f7b4dc4 100644 (file)
@@ -3,7 +3,7 @@ CREATE TABLE xonstat.player_nicks
   player_id integer NOT NULL,
   stripped_nick character varying(128) NOT NULL,
   nick character varying(128) NOT NULL,
-  create_dt timestamp without time zone NOT NULL DEFAULT now(),
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
   CONSTRAINT player_nicks_pk PRIMARY KEY (player_id, stripped_nick),
   CONSTRAINT player_nicks_fk01 FOREIGN KEY (player_id)
       REFERENCES xonstat.players (player_id) MATCH SIMPLE
index 2968a8982c0f5ceb5231a6aa5eb2f1db8f7eb8ce..60954bbff423ff3014adab4fdb37e418ab8a98c1 100644 (file)
@@ -10,7 +10,7 @@ CREATE TABLE xonstat.player_weapon_stats
   hit integer NOT NULL default 0,
   fired integer NOT NULL default 0,
   frags integer NOT NULL default 0,
-  create_dt timestamp without time zone NOT NULL DEFAULT now(),
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
   CONSTRAINT player_weapon_stats_pk PRIMARY KEY (player_weapon_stats_id),
   CONSTRAINT player_weapon_stats_fk001 FOREIGN KEY (player_id)
       REFERENCES xonstat.players (player_id) MATCH SIMPLE
index b51fb3380e60bc59789d1548d05abdde8d5d6fda..b75a53adfb89420361d1a32a1f94414a2c2d7c83 100644 (file)
@@ -4,7 +4,7 @@ CREATE TABLE xonstat.players
   nick character varying(128),
   stripped_nick character varying(128),
   "location" character varying(100),
-  create_dt timestamp without time zone NOT NULL DEFAULT now(),
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
   CONSTRAINT players_pk PRIMARY KEY (player_id)
 )
 WITH (
index 0bc4bbac54c336e4a32cae3c41c062b8d723d9be..fe3881e32a3513e9fd15418eb6129f82041fb2f1 100644 (file)
@@ -9,7 +9,7 @@ CREATE TABLE xonstat.servers
   revision character varying(50),
   pure_ind boolean NOT NULL DEFAULT true,
   active_ind boolean NOT NULL DEFAULT true,
-  create_dt timestamp without time zone NOT NULL DEFAULT now(),
+  create_dt timestamp without time zone NOT NULL DEFAULT (current_timestamp at time zone 'UTC'),
   CONSTRAINT servers_pk PRIMARY KEY (server_id)
 )
 WITH (