summaryrefslogtreecommitdiff
path: root/src/char_sql/int_auction.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char_sql/int_auction.c')
-rw-r--r--src/char_sql/int_auction.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/char_sql/int_auction.c b/src/char_sql/int_auction.c
index a21dbb22f..2e5e90c1d 100644
--- a/src/char_sql/int_auction.c
+++ b/src/char_sql/int_auction.c
@@ -23,12 +23,6 @@ void auction_delete(struct auction_data *auction);
static int auction_end_timer(int tid, unsigned int tick, int id, int data);
// Copy Paste from map/mail.c
-time_t calc_times(void)
-{
- time_t temp = time(NULL);
- return mktime(localtime(&temp));
-}
-
static int auction_count(int char_id, bool buy)
{
int i = 0;
@@ -86,7 +80,7 @@ unsigned int auction_create(struct auction_data *auction)
if( !auction )
return false;
- auction->timestamp = (int)calc_times() + (auction->hours * 3600);
+ auction->timestamp = calc_times() + (auction->hours * 3600);
StringBuf_Init(&buf);
StringBuf_Printf(&buf, "INSERT INTO `%s` (`seller_id`,`seller_name`,`buyer_id`,`buyer_name`,`price`,`buynow`,`hours`,`timestamp`,`nameid`,`item_name`,`type`,`refine`,`attribute`", auction_db);
@@ -184,7 +178,7 @@ void inter_auctions_fromsql(void)
struct item *item;
char *data;
StringBuf buf;
- unsigned int tick = gettick(), endtick, now = (unsigned int)calc_times();
+ unsigned int tick = gettick(), endtick, now = calc_times();
StringBuf_Init(&buf);
StringBuf_AppendStr(&buf, "SELECT `auction_id`,`seller_id`,`seller_name`,`buyer_id`,`buyer_name`,"