SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Simple Time Problem
-
May 29, 2001, 13:20 #1
- Join Date
- Oct 2000
- Posts
- 430
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Simple Time Problem
High,
I'm trying to echo out the local time - I live in the UK so I tried gmdate() - The only problem is that it doesn't seem to take into account the hour change for summer time - ie its one hour behind.
Does anyone know a solution??
Cheers
-
May 29, 2001, 13:50 #2
- Join Date
- Jan 2001
- Location
- Lawrence, Kansas
- Posts
- 2,066
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Work out the time difference in seconds and stick it in a variable:
PHP Code:$time_difference = -3600; // 60 seconds * 60 minutes = 1 hour
PHP Code:$time = time() + $time_difference;
$formatted_date = date ("l dS of F Y h:i:s A", $time);
-
May 30, 2001, 00:56 #3
- Join Date
- Oct 2000
- Posts
- 430
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Cheers
Bookmarks