RE: [PHP] gmdate
BigMark wrote on vrijdag 19 maart 2004 14:58: > Hi an anyone help here, i have a shoutbox that displays the time with > each message but the time is 8 hours behind my time. > > //here are the headers// > header("Expires: ".gmdate("D, d M Y H:i:s")."GMT"); > header("Cache-Control: no-cache, must-revalidate"); > header("Pragma: no-cache"); > > I have tried a few things but they didnt work and the coder hasnt > replied, i live in Perth Western Australia > > thankyou! Hey BigMark, Think this will do the trick $timezone=3600*8; // GMT + 8 $date = gmdate("D M Y H:i", time() + $timezone); MvG, Thijs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] gmdate
Hi an anyone help here, i have a shoutbox that displays the time with each message but the time is 8 hours behind my time. //here are the headers// header("Expires: ".gmdate("D, d M Y H:i:s")."GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); I have tried a few things but they didnt work and the coder hasnt replied, i live in Perth Western Australia thankyou! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gmdate problem
Hi, On Tue, 21 Oct 2003 12:44:38 +0800 [EMAIL PROTECTED] wrote: > > Hi all, >Having some problem with 'gmdate' here. However, the time >doesn't match > with the current time on the system. What could be the problem? Do I > have to set any timezone or stuff like that?...Hope to get some help > here. >From the manual: (http://www.php.net/manual/en/function.gmdate.php) [quote] Identical to the date() function except that the time returned is Greenwich Mean Time (GMT). [/quote] So, I guess, you have to make sure first that your server (system) is located inside the GMT time zone :) - E - __ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gmdate problem
On Tue, Oct 21, 2003 at 12:44:38PM +0800, [EMAIL PROTECTED] wrote: : : Having some problem with 'gmdate' here. However, the time doesn't : match with the current time on the system. What could be the problem? : Do I have to set any timezone or stuff like that?...Hope to get some : help here. : : Tue, 21st Oct 2003, 04:25 : : gmdate() returns the the GMT/UTC time (i.e. timezone 0). Unless your system's timezone is zero because it is in Greenwich, gmdate() does not adjust its result to your local timezone and you will not get the answer you expected. What's wrong with date()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] gmdate problem
Hi all, Having some problem with 'gmdate' here. However, the time doesn't match with the current time on the system. What could be the problem? Do I have to set any timezone or stuff like that?...Hope to get some help here. Tue, 21st Oct 2003, 04:25 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gmdate()
Huh? I think date() will return different values, but gmdate() will not, since it returns GM time. Lallous, maybe it is something about summertime/wintertime? Timo Am Freitag den, 6. September 2002, um 16:36, schrieb Naintara Jain: > lets say, > > ServerOne has TimeZone GMT+2 > ServerTwo has TimeZone GMT+3 > > the gmdate() will return diff values for the same timestamp. > essentially there will be a diff of 1 hour in the return values > from these > two servers. > > -Naintara > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:php-general- > [EMAIL PROTECTED] > t]On Behalf Of lallous > Sent: Friday, September 06, 2002 8:55 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] gmdate() > > > I don't own the server, and the server is probably set up > correctly as it is > a web hosting server. > > anyway, how should that RedHat 6 server be set up ? > > Elias > "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> The server needs to be set up correctly - it needs to know what time >> zone it is in and if the BIOS time is GMT or local. >> >> lallous wrote: >> >>> Isn't the gmdate() supposed to return the same value when run >>> from two >>> different timezones? >>> >>> >>> I run it on GMT+2 system and EDT system, and I get 1 hour difference, >>> >>> please advise. >>> >>> Elias >>> >>> >>> >>> >>> >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gmdate()
I got an idea to solve my problem. I'll make client side calculation. I'll set the user pick a future time and then calculate from the client side how many minutes exists between these two times, then pass the minutes difference to the server. "Naintara Jain" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > lets say, > > ServerOne has TimeZone GMT+2 > ServerTwo has TimeZone GMT+3 > > the gmdate() will return diff values for the same timestamp. > essentially there will be a diff of 1 hour in the return values from these > two servers. > > -Naintara > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > t]On Behalf Of lallous > Sent: Friday, September 06, 2002 8:55 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] gmdate() > > > I don't own the server, and the server is probably set up correctly as it is > a web hosting server. > > anyway, how should that RedHat 6 server be set up ? > > Elias > "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > The server needs to be set up correctly - it needs to know what time > > zone it is in and if the BIOS time is GMT or local. > > > > lallous wrote: > > > > >Isn't the gmdate() supposed to return the same value when run from two > > >different timezones? > > > > > > > > >I run it on GMT+2 system and EDT system, and I get 1 hour difference, > > > > > >please advise. > > > > > >Elias > > > > > > > > > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] gmdate()
lets say, ServerOne has TimeZone GMT+2 ServerTwo has TimeZone GMT+3 the gmdate() will return diff values for the same timestamp. essentially there will be a diff of 1 hour in the return values from these two servers. -Naintara -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] t]On Behalf Of lallous Sent: Friday, September 06, 2002 8:55 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] gmdate() I don't own the server, and the server is probably set up correctly as it is a web hosting server. anyway, how should that RedHat 6 server be set up ? Elias "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > The server needs to be set up correctly - it needs to know what time > zone it is in and if the BIOS time is GMT or local. > > lallous wrote: > > >Isn't the gmdate() supposed to return the same value when run from two > >different timezones? > > > > > >I run it on GMT+2 system and EDT system, and I get 1 hour difference, > > > >please advise. > > > >Elias > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gmdate()
I don't own the server, and the server is probably set up correctly as it is a web hosting server. anyway, how should that RedHat 6 server be set up ? Elias "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > The server needs to be set up correctly - it needs to know what time > zone it is in and if the BIOS time is GMT or local. > > lallous wrote: > > >Isn't the gmdate() supposed to return the same value when run from two > >different timezones? > > > > > >I run it on GMT+2 system and EDT system, and I get 1 hour difference, > > > >please advise. > > > >Elias > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gmdate()
The server needs to be set up correctly - it needs to know what time zone it is in and if the BIOS time is GMT or local. lallous wrote: >Isn't the gmdate() supposed to return the same value when run from two >different timezones? > > >I run it on GMT+2 system and EDT system, and I get 1 hour difference, > >please advise. > >Elias > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] gmdate()
Isn't the gmdate() supposed to return the same value when run from two different timezones? I run it on GMT+2 system and EDT system, and I get 1 hour difference, please advise. Elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] gmdate question
On Mon, 20 May 2002, SP wrote: > I am using gmdate to get the GMT timezone and it's working but how does > it know what timezone my server is to make the time adjustment? > Where's the setting for this? In your server's configuration files somewhere. Nothing to do with PHP. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] gmdate question
I am using gmdate to get the GMT timezone and it's working but how does it know what timezone my server is to make the time adjustment? Where's the setting for this? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.361 / Virus Database: 199 - Release Date: 07/05/02 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] gmdate
I am using gmdate to get the GMT timezone and it's working but how does it know what timezone my server is to make the time adjustment? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.361 / Virus Database: 199 - Release Date: 07/05/02 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php