If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:
L2JDP Revision Number:
Hi, i'm searching how the server calcule the time for insert a new 7 day item to one user. I'm trying with date/mktime function but i can't obtain a correct timestamp value. How i can calculate this value?
Regards.
7 day items: time in items BBD table?
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- Flashy
- Posts: 310
- Joined: Mon Sep 29, 2008 11:49 am
- Location: Germany
Re: 7 day items: time in items BBD table?
other question, what is the target? why u want calc this value?
-
- Posts: 15
- Joined: Thu Jan 06, 2011 5:19 pm
Re: 7 day items: time in items BBD table?
I'm trying get a 7 day horse reward for vote my server, then i use the INSERT mysql function with the correct values (owner_id, item_id...) but i can't get the value for the variable "time" for a 7 day items.
If i create ingame this item, i obtain this value (for now):
1297786714574
How i can obtain this value in php for isert it in the database?
I'm tryed using date and mktime functions for obtain a timestamp, but is not work.
How the server obtain this value??
If i create ingame this item, i obtain this value (for now):
1297786714574
How i can obtain this value in php for isert it in the database?
I'm tryed using date and mktime functions for obtain a timestamp, but is not work.
How the server obtain this value??
- Flashy
- Posts: 310
- Joined: Mon Sep 29, 2008 11:49 am
- Location: Germany
Re: 7 day items: time in items BBD table?
in php.. use function: microtime() it return the unix timestamp within milisec. was what ur question?
this is exact the value u need for db insert...
example:
this is exact the value u need for db insert...
example:
Code: Select all
//Return the unix timestamp + microseconds function micro_time() { $timearray = explode(" ", microtime()); return ($timearray[1] + $timearray[0]); }
Last edited by Flashy on Tue Feb 08, 2011 6:12 pm, edited 1 time in total.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: 7 day items: time in items BBD table?
it's unixtime in milliseconds.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- Posts: 15
- Joined: Thu Jan 06, 2011 5:19 pm
Re: 7 day items: time in items BBD table?
Ok, my unixtime was in seconds
Thx for ur time!!!!
PD: Solved.

Thx for ur time!!!!
PD: Solved.