cows
-
Posts
5 -
Joined
-
Last visited
Never
Posts posted by cows
-
-
Thank you.
I never realised the date function formatted the dates using the server's time zone settings and daylight saving settings. I thought it would format the date as-is, UCT.
Is there anyway I can get the formatted date in UCT with that date function or another function? -
Yes, sorry. I need it to read [b]00:00:03[/b].
-
I think..
[code]round("1.33333333333333", 2);[/code] -
Hi,
I am pretty new to php and I have a problem I can't quite figure out. I am not sure if I am misunderstanding the date() function or there is something else I am missing.
I have this time stamp: [b]1159660803[/b]
In the time stamp converter it says [b]Sun, 1 Oct 2006 00:00:03 UTC[/b]
When i try get that from the date() function using
[code]date('l dS \of F Y h:i:s A', 1159660803);[/code]
I get a date/time and hour out ([b]Sunday 01st of October 2006 01:00:03 AM[/b])
I need to get the time in the time stamp, is there something I am doing wrong or not quite understanding? The server is in the UK if that makes any difference.
Any help would be appreciated, I have spent all night trying to figure out what I am doing wrong. :(
date function problems
in PHP Coding Help
Posted
This may work....
[code]
<?php
echo date('D, j M Y h:i:s', 1159660803 - date('Z'));
// or
date_default_timezone_set('UTC');
echo date('D, j M Y h:i:s', 1159660803)
?>
[/code]
[/quote]
The first solution worked perfectly. Thank you very much. I didn't want to use the date_default_timezone_set() because the server doesn't support that yet.
Thank you for all the replies, they are much appreciated.