473,324 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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
Feb 27 '08 #1
7 2714
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steven | last post by:
I actually have two questions: 1. I try to get current time, but the time I got is 1 hour different from my local time. I assume it is caused by Time Zone. So is there any easy way to fix this?...
4
by: dan glenn | last post by:
Say, I want to set a cookie and have it expire an hour after it's set. It's looking like this is only possible for browsers which are in the same time zone as my server?? In other words, if I...
3
by: Jon Davis | last post by:
The date string: "Thu, 17 Jul 2003 12:35:18 PST" The problem: // this fails on PST DateTime myDate = DateTime.Parse("Thu, 17 Jul 2003 12:35:18 PST"); Help? Jon
4
by: brfin999 | last post by:
Server time zone 1 hour different from Client time zone. .Net 1.1 c# Win Forms app: actual date 9/25/04 displays 9/24/04 11:00 PM. When I change client time zone to equal server time zone, date...
6
by: gerry | last post by:
I am almost at the end of my rope - I have to go through this process everytime a new version of studio is released or it is installed on a new machine - what a (^%&$^& pain. I am trying to...
2
by: =?Utf-8?B?R2ls?= | last post by:
I have a server (Win2k3 SBS) that is a domain controller and exchange server. I failed to apply the DST patches until after the DST kicked in. I have since completed successfully the patches and...
1
by: =?Utf-8?B?UmljYXJkbyBRdWludGFuaWxsYQ==?= | last post by:
how to simulate a different time zone? ¿is it possible by code to simulate that i am in a different time zone just for to execute a few lines of code? in my case i am in the time zone...
1
by: scan87 | last post by:
Can someone please, please help me in finding the slotuion of the following problem: The cost of one-day travel cards for adult customers on the metro system is based on which zones they cover and...
2
by: ANS | last post by:
Hi, We need to create different databases for our application serving different regions (India, US and UK). All this on one database server (multiple instances is a possiblilty). Is there a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.