Jump to content

Recommended Posts

hmm.. this is what i was trying to do

 

$endtime = mktime(0,0,0,12,30,2009);
$currenttime = time();
$timeleft = ($endtime - $currenttime);

and then figure out the days/hours until the endtime based on the timeleft... it was giving me the wrong time so i tested the time() like in my first post... i'm still unsure how to use the gmdate

 

the example says

 

echo gmdate("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998));

 

what is the 1/1/1998 date all about? like how does it return "Dec 31 1997 22:00:00"? and do i need to do date formatting stuff to figure out the difference?

 

 

edit:

 

maybe it wasn't the date, it was the mktime that was off? and should be gmmktime? i did this and it seems to be working... still have the questions above i'm confused about

Link to comment
https://forums.phpfreaks.com/topic/186106-gmttime/#findComment-982832
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.