Jump to content

Recommended Posts

Hello i created an image called upgrade, also two fields in my database: starttime and endtime. When my happy player clicks on that button, i need the exact time the player did this, i also need an extra 15-minutes to be added to that time the happy player clicked the upgrade button.  Can someone explain how this would be done? Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/174597-help-please-datetime/
Share on other sites

$time = date("H:i:s");
$newtime = date("H:i:s", strtotime("+15 minute"));
echo $time."<br />".$newtime;

returns the following (eastern standard time)

16:36:37

16:51:37

 

that is the time now, 15 minutes from now

 

is that what you want?

Link to comment
https://forums.phpfreaks.com/topic/174597-help-please-datetime/#findComment-920325
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.