Jump to content

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!
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.