Hey everyone, this is my first messege to this group, so I hope it's
fitting.
I've been messing with time alot recently, particularly time
formatting. During that, I've observed, that when getting a date in
RFC 822 format (like: Thu, 21 Dec 2000 16:01:07 +0200), sometimes, the
timezone offset will differ.
Sometimes, PHP will use +0100 and othertimes, +0200. I've also fed the
unix timestamp, from which php generated the date, into a similar
JavaScript of mine. Here, I can also see, that the timezone offset
differs. Sometimes, it's +0200, othertimes, +0100.
While I know it doesn't make a difference, time elapsed wise, it kinda
strikes me as strange. I'm personally in +0200 (CET with summer time),
while the server should also be in +0200 (but it might be in something
else, it's not mine, but I know it's here in the country).
Here is a randomly generated date list:
And here's the code:
<pre><?php
function getStamp() {
$higest = time();
return mt_rand(0,$hige st);
}
for ($i = 0; $i < 100; $i++) {
$d = getStamp();
echo date("r",$d)."< br>";
}
?></pre>
(if it's ugly, don't yell, I never write PHP)
So, any ideas why? Just...flimsy computers?
Regards,
Svend
fitting.
I've been messing with time alot recently, particularly time
formatting. During that, I've observed, that when getting a date in
RFC 822 format (like: Thu, 21 Dec 2000 16:01:07 +0200), sometimes, the
timezone offset will differ.
Sometimes, PHP will use +0100 and othertimes, +0200. I've also fed the
unix timestamp, from which php generated the date, into a similar
JavaScript of mine. Here, I can also see, that the timezone offset
differs. Sometimes, it's +0200, othertimes, +0100.
While I know it doesn't make a difference, time elapsed wise, it kinda
strikes me as strange. I'm personally in +0200 (CET with summer time),
while the server should also be in +0200 (but it might be in something
else, it's not mine, but I know it's here in the country).
Here is a randomly generated date list:
And here's the code:
<pre><?php
function getStamp() {
$higest = time();
return mt_rand(0,$hige st);
}
for ($i = 0; $i < 100; $i++) {
$d = getStamp();
echo date("r",$d)."< br>";
}
?></pre>
(if it's ugly, don't yell, I never write PHP)
So, any ideas why? Just...flimsy computers?
Regards,
Svend