PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Server in a different time zone
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Server in a different time zone

Réponse
 
LinkBack Outils de la discussion
Vieux 27/02/2008, 10h36   #1
Correia
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Server in a different time zone

I have a webserver that is in another country and have a different
time zone.
How can i fix this and use the scripts with the correct time zone?

Thanks
  Réponse avec citation
Vieux 27/02/2008, 11h00   #2
rf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Server in a different time zone


"Correia" <jumacid@gmail.com> wrote in message
news:8dd93906-724f-44bc-a549-3c1d7f8739db@n77g2000hse.googlegroups.com...
>I have a webserver that is in another country and have a different
> time zone.


The majority of the world is in a time zone different to your server. How is
your particular position different?

> How can i fix this and use the scripts with the correct time zone?


What? What scripts? And why does the time matter?

--
Richard.


  Réponse avec citation
Vieux 27/02/2008, 11h03   #3
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Server in a different time zone

On Wed, 27 Feb 2008 11:36:28 +0100, Correia <jumacid@gmail.com> wrote:

> I have a webserver that is in another country and have a different
> time zone.
> How can i fix this and use the scripts with the correct time zone?


http://nl2.php.net/manual/en/functio...mezone-set.php
--
Rik Wasmus
  Réponse avec citation
Vieux 27/02/2008, 11h14   #4
Correia
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Server in a different time zone

On Feb 27, 11:00am, "rf" <r...@invalid.com> wrote:
> "Correia" <juma...@gmail.com> wrote in message
>
> news:8dd93906-724f-44bc-a549-3c1d7f8739db@n77g2000hse.googlegroups.com...
>
> >I have a webserver that is in another country and have a different
> > time zone.

>
> The majority of the world is in a time zone different to your server. How is
> your particular position different?



Because this particular site is only to be used in a single country
with a single time zone.


>
> > How can i fix this and use the scripts with the correct time zone?

>
> What? What scripts? And why does the time matter?


The time zone matters because the content do be delivered will be hour
sensitive.





>
> --
> Richard.


  Réponse avec citation
Vieux 28/02/2008, 10h48   #5
Satya
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Server in a different time zone

On Feb 27, 4:14 pm, Correia <juma...@gmail.com> wrote:
> On Feb 27, 11:00 am, "rf" <r...@invalid.com> wrote:
>
> > "Correia" <juma...@gmail.com> wrote in message

>
> >news:8dd93906-724f-44bc-a549-3c1d7f8739db@n77g2000hse.googlegroups.com...

>
> > >I have a webserver that is in another country and have a different
> > > time zone.

>
> > The majority of the world is in a time zone different to your server. How is
> > your particular position different?

>
> Because this particular site is only to be used in a single country
> with a single time zone.
>
>
>
> > > How can i fix this and use the scripts with the correct time zone?

>
> > What? What scripts? And why does the time matter?

>
> The time zone matters because the content do be delivered will be hour
> sensitive.
>
>
>
> > --
> > Richard.


So, i will suggest, store GMT time in your database and add your time
difference when you are using it through script. Do the same with
server time. Convert it to gmt time and manage the difference. This
way you are free from any future change.


satya61229.blogspot.com
  Réponse avec citation
Vieux 28/02/2008, 13h13   #6
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Server in a different time zone

Satya wrote:
> On Feb 27, 4:14 pm, Correia <juma...@gmail.com> wrote:
>> On Feb 27, 11:00 am, "rf" <r...@invalid.com> wrote:
>>
>>> "Correia" <juma...@gmail.com> wrote in message
>>> news:8dd93906-724f-44bc-a549-3c1d7f8739db@n77g2000hse.googlegroups.com...
>>>> I have a webserver that is in another country and have a different
>>>> time zone.
>>> The majority of the world is in a time zone different to your server. How is
>>> your particular position different?

>> Because this particular site is only to be used in a single country
>> with a single time zone.
>>
>>
>>
>>>> How can i fix this and use the scripts with the correct time zone?
>>> What? What scripts? And why does the time matter?

>> The time zone matters because the content do be delivered will be hour
>> sensitive.
>>
>>
>>
>>> --
>>> Richard.

>
> So, i will suggest, store GMT time in your database and add your time
> difference when you are using it through script. Do the same with
> server time. Convert it to gmt time and manage the difference. This
> way you are free from any future change.
>
>
> satya61229.blogspot.com
>


Probably the WORST solution in this case. Rik's response is much better.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 28/02/2008, 14h46   #7
Rik Wasmus
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Server in a different time zone

On Thu, 28 Feb 2008 14:13:22 +0100, Jerry Stuckle
<jstucklex@attglobal.net> wrote:

> Satya wrote:
>> On Feb 27, 4:14 pm, Correia <juma...@gmail.com> wrote:
>>> On Feb 27, 11:00 am, "rf" <r...@invalid.com> wrote:
>>>
>>>> "Correia" <juma...@gmail.com> wrote in message
>>>> news:8dd93906-724f-44bc-a549-3c1d7f8739db@n77g2000hse.googlegroups.com...
>>>>> I have a webserver that is in another country and have a different
>>>>> time zone.
>>>> The majority of the world is in a time zone different to your server.
>>>> How is
>>>> your particular position different?
>>> Because this particular site is only to be used in a single country
>>> with a single time zone.
>>>
>>>
>>>
>>>>> How can i fix this and use the scripts with the correct time zone?
>>>> What? What scripts? And why does the time matter?
>>> The time zone matters because the content do be delivered will be hour
>>> sensitive.
>>>

>> So, i will suggest, store GMT time in your database and add your time
>> difference when you are using it through script. Do the same with
>> server time. Convert it to gmt time and manage the difference. This
>> way you are free from any future change.
>> satya61229.blogspot.com
>>

>
> Probably the WORST solution in this case. Rik's response is much better.


I'd say so, provided you cater to one specific timezone. Be aware that one
uses dates/times for a database setting the timezone of the connection
would be advisable:
<http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html>

If you have a big international page, storing datetime from posts at a
forum for instance could give funky results, having replies from an
earlier timezone (12:00 for instance) before those from a later one
(11:00). In that case, sticking with a default timezone for storing, and
altering/recalculating on display for a user in a specific timezone (or
just explicatly mentioning the used timezone in case of a known more savvy
public) might be better.
--
Rik Wasmus
  Réponse avec citation
Vieux 28/02/2008, 15h21   #8
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Server in a different time zone

Rik Wasmus wrote:
> On Thu, 28 Feb 2008 14:13:22 +0100, Jerry Stuckle
> <jstucklex@attglobal.net> wrote:
>
>> Satya wrote:
>>> On Feb 27, 4:14 pm, Correia <juma...@gmail.com> wrote:
>>>> On Feb 27, 11:00 am, "rf" <r...@invalid.com> wrote:
>>>>
>>>>> "Correia" <juma...@gmail.com> wrote in message
>>>>> news:8dd93906-724f-44bc-a549-3c1d7f8739db@n77g2000hse.googlegroups.com...
>>>>>
>>>>>> I have a webserver that is in another country and have a different
>>>>>> time zone.
>>>>> The majority of the world is in a time zone different to your
>>>>> server. How is
>>>>> your particular position different?
>>>> Because this particular site is only to be used in a single country
>>>> with a single time zone.
>>>>
>>>>
>>>>
>>>>>> How can i fix this and use the scripts with the correct time zone?
>>>>> What? What scripts? And why does the time matter?
>>>> The time zone matters because the content do be delivered will be hour
>>>> sensitive.
>>>>
>>> So, i will suggest, store GMT time in your database and add your time
>>> difference when you are using it through script. Do the same with
>>> server time. Convert it to gmt time and manage the difference. This
>>> way you are free from any future change.
>>> satya61229.blogspot.com
>>>

>>
>> Probably the WORST solution in this case. Rik's response is much better.

>
> I'd say so, provided you cater to one specific timezone. Be aware that
> one uses dates/times for a database setting the timezone of the
> connection would be advisable:
> <http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html>
>
> If you have a big international page, storing datetime from posts at a
> forum for instance could give funky results, having replies from an
> earlier timezone (12:00 for instance) before those from a later one
> (11:00). In that case, sticking with a default timezone for storing, and
> altering/recalculating on display for a user in a specific timezone (or
> just explicatly mentioning the used timezone in case of a known more
> savvy public) might be better.


True, Rik, if you need multiple timezones. But the op indicated the
target audience was all in one timezone - which makes your solution much
superior.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h26.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16977 seconds with 16 queries