By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,965 Members | 1,687 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,965 IT Pros & Developers. It's quick & easy.

Server in a different time zone

P: n/a
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
Feb 27 '08 #1
Share this Question
Share on Google+
7 Replies


P: n/a
rf

"Correia" <ju*****@gmail.comwrote in message
news:8d**********************************@n77g2000 hse.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.
Feb 27 '08 #2

P: n/a
On Wed, 27 Feb 2008 11:36:28 +0100, Correia <ju*****@gmail.comwrote:
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
Feb 27 '08 #3

P: n/a
On Feb 27, 11:00*am, "rf" <r...@invalid.comwrote:
"Correia" <juma...@gmail.comwrote in message

news:8d**********************************@n77g2000 hse.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.
Feb 27 '08 #4

P: n/a
On Feb 27, 4:14 pm, Correia <juma...@gmail.comwrote:
On Feb 27, 11:00 am, "rf" <r...@invalid.comwrote:
"Correia" <juma...@gmail.comwrote in message
news:8d**********************************@n77g2000 hse.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
Feb 28 '08 #5

P: n/a
Satya wrote:
On Feb 27, 4:14 pm, Correia <juma...@gmail.comwrote:
>On Feb 27, 11:00 am, "rf" <r...@invalid.comwrote:
>>"Correia" <juma...@gmail.comwrote in message
news:8d**********************************@n77g20 00hse.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.
js*******@attglobal.net
==================

Feb 28 '08 #6

P: n/a
On Thu, 28 Feb 2008 14:13:22 +0100, Jerry Stuckle
<js*******@attglobal.netwrote:
Satya wrote:
>On Feb 27, 4:14 pm, Correia <juma...@gmail.comwrote:
>>On Feb 27, 11:00 am, "rf" <r...@invalid.comwrote:

"Correia" <juma...@gmail.comwrote in message
news:8d**********************************@n77g2 000hse.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
Feb 28 '08 #7

P: n/a
Rik Wasmus wrote:
On Thu, 28 Feb 2008 14:13:22 +0100, Jerry Stuckle
<js*******@attglobal.netwrote:
>Satya wrote:
>>On Feb 27, 4:14 pm, Correia <juma...@gmail.comwrote:
On Feb 27, 11:00 am, "rf" <r...@invalid.comwrote:

"Correia" <juma...@gmail.comwrote in message
news:8d**********************************@n77g 2000hse.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.
js*******@attglobal.net
==================

Feb 28 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.