Jump to content

Archived

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

andie

Stupid Noobie date() question

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!

Share this post


Link to post
Share on other sites
Simply do this:

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

echo $date;[/code]

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

×

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.