andie Posted March 13, 2006 Share Posted March 13, 2006 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 More sharing options...
Gast Posted March 13, 2006 Share Posted March 13, 2006 Simply do this:[code]$date = date("d/m/y ");$date .= date("G") - 8;$date .= date(":i:s");echo $date;[/code] Link to comment https://forums.phpfreaks.com/topic/4867-stupid-noobie-date-question/#findComment-17130 Share on other sites More sharing options...
andie Posted March 13, 2006 Author Share Posted March 13, 2006 [!--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! Link to comment https://forums.phpfreaks.com/topic/4867-stupid-noobie-date-question/#findComment-17139 Share on other sites More sharing options...
Gast Posted March 13, 2006 Share Posted March 13, 2006 no problem :) Link to comment https://forums.phpfreaks.com/topic/4867-stupid-noobie-date-question/#findComment-17152 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.