Jump to content

Stupid Noobie date() question


andie

Recommended Posts

Ok, Im so new at this its disgusting.

I have a simple script that runs on my WordPress blog to track IP's of visitors.

The problem is that the time returns on the log to some other crazy timezone (my server's I think?).

I would like the log to report back to me the time offset for where I am at...PDT (GMT -8).

Here is what the script says for the date() function:

$date = date ("d/m/y g:i a");

Thanks!
Link to comment
https://forums.phpfreaks.com/topic/4867-stupid-noobie-date-question/
Share on other sites

[!--quoteo(post=354647:date=Mar 13 2006, 12:34 PM:name=Gast)--][div class=\'quotetop\']QUOTE(Gast @ Mar 13 2006, 12:34 PM) [snapback]354647[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Simply do this:

[code]$date = date("d/m/y ");
$date .= date("G") - 8;
$date .= date(":i:s");

echo $date;[/code]
[/quote]

AWESOME! Thank you so much! It worked!

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.