Post Reply  Post Thread 
PHP script to find difference between server time and local time
Author Message
admin
~CM~
*******


Posts: 147
Group: Administrators
Joined: Jul 2007
Status: Offline
Reputation: 0
Thank 0
2 was given thank in 2 posts
Post: #1
PHP script to find difference between server time and local time

Following is the script to find time difference here is “14″, which is the difference between local time and the server time which is in Australia non-daylight savings time. When we change over to daylight savings time — late October.

Code Example:

PHP Code:
$hourdiff "14"// hours diff btwn server and local time
$melbdate date("l, d F Y h:i a",time() + ($hourdiff 3600));
print (
"$melbdate"); 


Thanks & Regards
------------------
~CM~

ADD TO DEL.ICIO.US  ADD TO DIGG  ADD TO FURL  ADD TO NEWSVINE  ADD TO NETSCAPE 
ADD TO TECHNORATI FAVORITES  Technorati ADD TO SQUIDOO  ADD TO WINDOWS LIVE  ADD TO YAHOO MYWEB  ADD TO ASK 
ADD TO REDDIT  ADD TO STUMBLEUPON  ADD TO GOOGLE   

This post was last modified: 07-18-2007 04:37 AM by admin.

07-18-2007 04:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  PHP Script to parse /etc/passwd and how to use the new __get magic method (PHP5) admin 0 453 07-19-2007 03:46 PM
Last Post: admin
  Simple php script for site visitor counter admin 0 367 07-18-2007 07:19 PM
Last Post: admin
  GD test script Nilesh 0 716 07-15-2007 09:31 AM
Last Post: Nilesh
  Zend Optimizer test script Nilesh 0 1,214 07-15-2007 09:22 AM
Last Post: Nilesh
  How to Send Email from a PHP Script Using SMTP Authentication Nilesh 0 4,035 07-15-2007 09:17 AM
Last Post: Nilesh
  PHP script for backup of mysql database admin 0 583 07-15-2007 03:33 AM
Last Post: admin
  PHP script for Duration Calculator admin 0 327 07-15-2007 03:23 AM
Last Post: admin

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: