DB and Time Stamps

Development forum for the EQ2Emulator Database project.

Moderator: Team Members

Post Reply
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

DB and Time Stamps

Post by John Adams » Fri May 30, 2008 8:17 pm

LE,
Would it be a real huge pain in the ass to switch all our time/date stamps to unix_timestamp now? I think it's cheaper to store and index on int(11) than `datetime` or `timestamp`:
Example from `characters` table:

Code: Select all

  `created_date` timestamp NOT NULL default '0000-00-00 00:00:00',
  `last_played` datetime NOT NULL default '0000-00-00 00:00:00',
No biggie if not. All the timestamps I am adding are int(11) is all. I long for consistency.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Fri May 30, 2008 9:00 pm

No, I don't think it would be a pain. Feel free to do so before I leave so that I can fix the code if it does break something.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Fri May 30, 2008 9:21 pm

I am pretty sure the only place that time is stored currently is during character creation - and I am not sure the emulator uses the data for anything now anyway.
I just wanted to check with you before any other "date" stuff gets added (quests, guilds, tradeskills, logging). The characters date can stay until you return. No hurry. Let's just make any new date/time data the int(11) / unix timestamp format.

link2009
Retired
Posts: 390
Joined: Fri Aug 10, 2007 5:59 pm
Location: POrTal
Contact:

Post by link2009 » Sat May 31, 2008 9:11 am

I like this idea John. unix_timestamp is easier on load considering that the traditional datetime has more data.
I don't think we'll be using dates/times until we do have quests. I would like to use this idea for quests.
For example:
Quest started on Saturday May 31st, 2008 12:11
Finished on Sunday June 1st, 2008 16:12
This way you can have 'timed' quests and possibly provide different loot based on the time used for completion.
Image
-Vecinu de la Patru

Aaden
Retired
Posts: 64
Joined: Mon Aug 27, 2007 12:39 pm
Location: Connecticut
Contact:

Post by Aaden » Sat May 31, 2008 2:44 pm

link, thats a good idea i actually wrote an eqperl quest that did that, it kept an active timer up and the amount of time it took to complete it would throw you a different set of reward options. We could definitly do that with LE's lua system :D
Image

link2009
Retired
Posts: 390
Joined: Fri Aug 10, 2007 5:59 pm
Location: POrTal
Contact:

Post by link2009 » Sat May 31, 2008 5:03 pm

Those are the only ideas I get...great IDEAS! 8)
:lol:
Image
-Vecinu de la Patru

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests