HOW TO GET CURRENT MACHINE TIME??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shamal9586
Forum Newbie
Posts: 2
Joined: Tue Feb 10, 2009 10:17 pm

HOW TO GET CURRENT MACHINE TIME??

Post by shamal9586 »

pls help me out to find out the code segment to get the current machine time... the time() function isn't working properly...date("r") is also not working....
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: HOW TO GET CURRENT MACHINE TIME??

Post by s.dot »

time() shows the current unix timestamp
date('n-d-Y \a\\t g:i A') will give you a formatted date, see php.net/date for more formatting details
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
shamal9586
Forum Newbie
Posts: 2
Joined: Tue Feb 10, 2009 10:17 pm

Re: HOW TO GET CURRENT MACHINE TIME??

Post by shamal9586 »

the current machine time when i'm checking 's 12:11 and it shows 6:50 AM as time... date 's correct...
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: HOW TO GET CURRENT MACHINE TIME??

Post by pickle »

Maybe your timezone settings are off?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
christine
Forum Newbie
Posts: 1
Joined: Wed Apr 15, 2009 2:08 pm

Re: HOW TO GET CURRENT MACHINE TIME??

Post by christine »

Timestamp is not the same as unix timestamp . Current unix timestamp and unix timestamp converter is available
here
Post Reply