Jump to content

gmttime()?


smerny

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.