|
-
Jun 29th, 2002, 12:36 PM
#1
Thread Starter
New Member
Servers Based In USA, Im in UK, Time Difference?
Hi there, my server is based in the use, and the server clock is 5 hours behind my preasent time. How can i make it so the time on my scripts is forward 5 hours??
-
Jun 30th, 2002, 09:07 AM
#2
you could use mktime() and add 5 hours to it. something like
PHP Code:
$hr = date("H");
$min = date("i");
$sec = date("s");
$newtime = strftime("%H:%i:%s", mktime($hr+5,$min,$sec,0,0,0));
of course you can change the format if you want a different time, like change H to h if you want the time to only goto 12 instead of 23
-
Jun 30th, 2002, 09:31 AM
#3
Thread Starter
New Member
cheers mate
-
Jun 30th, 2002, 06:28 PM
#4
PowerPoster
The PHP function gmtime function will always return the date/time in GMT.
During our summer you can add 1 to that, during winter leave the returned value as it is. I tend to just leave it as it is and always put "GMT" after the value so people know.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|