473,387 Members | 1,798 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,387 software developers and data experts.

Countries and TimeZones

I want to make a list like http://www.rs-data.at/martin/ausgabe.html.

People can enter the data at http://www.rs-data.at/martin/eingabe.html
(doesn't work yet).

This is a list when competitions for a certain game start. The green and
red light should start flashing 10 minutes before the cup starts.

But the problem I have: The guys who start the server for a competiton
might be in different countries. So how can I figure out when the light
should start flashing?

I thought of creating a drop-down box for entering the country in the
entry-formular and binding this drop-down with a info of the current
time zone. But summer and winter time might chance and also some
countries have different Time Zones.

Maybe I could get the local time from his computer, or maybe something
else?
Jul 17 '05 #1
4 5794
Hi Martin,

Martin Brunner schrieb:
But the problem I have: The guys who start the server for a competiton
might be in different countries. So how can I figure out when the light
should start flashing?

I thought of creating a drop-down box for entering the country in the
entry-formular and binding this drop-down with a info of the current
time zone. But summer and winter time might chance and also some
countries have different Time Zones.

Maybe I could get the local time from his computer, or maybe something
else?


You could get the local time of the client computer (via JavaScript).
But why would you want to do it in such a complicated manner? Why not
just use the local time on your own webserver? Should be accessible
through PHP enviroment variables, though ...

It seems to me that the time function should do the trick:
http://de3.php.net/manual/en/function.time.php
--
________________________________
Monika E. L. Beisel
Universität Kaiserslautern
E-Mail: be****@rhrk.uni-kl.de

Jul 17 '05 #2
Monika Beisel schrieb:
You could get the local time of the client computer (via JavaScript).
But why would you want to do it in such a complicated manner? Why not
just use the local time on your own webserver? Should be accessible
through PHP enviroment variables, though ...


I guess people enter their times and don't want to calculate much. Also
the Server is in the US and most competitors are from Finland, so it
might be confusing for them always to add 8 hours just to know when the
next competition starts.
Jul 17 '05 #3


Martin Brunner schrieb:
Monika Beisel schrieb:

You could get the local time of the client computer (via JavaScript).
But why would you want to do it in such a complicated manner? Why not
just use the local time on your own webserver? Should be accessible
through PHP enviroment variables, though ...

I guess people enter their times and don't want to calculate much. Also
the Server is in the US and most competitors are from Finland, so it
might be confusing for them always to add 8 hours just to know when the
next competition starts.


There are 2 possibilities:
- people "start the race" by clicking the button exactly ten minutes
before the race starts (then you can use your server time)

- or -

- people enter the starting time *WITH* the appropriate time zone of the
location where the race is going to take place. You should use a
dropdown list like "GMT + 1: Berlin", "GMT: London", etc. You can store
the values in your database in a special time format including the time
zone.

--
________________________________
Monika E. L. Beisel
Universität Kaiserslautern
E-Mail: be****@rhrk.uni-kl.de

Jul 17 '05 #4
Martin Brunner <mb******@mcnon.com> wrote in news:bkmcdt$3dpi5$1@ID-
819.news.uni-berlin.de:
http://www.rs-data.at/martin/ausgabe.html


Here's what I would do (and have): Use javascript to determine the user's
timezone (getTimezoneOffset) and store it as a session variable. Store all
event times as GMT. I'm sure you can take it from there.

-- Don
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Michael | last post by:
I would like to set the timezone of a thread to allow me to calculate the UTC time for data sourced from a number of time zones. Although this can be done in C and C++, I annot find how to do...
0
by: Robert Treat | last post by:
I am trying to figure out if there is a way to determine the timezones supported in postgresql from within the database. If you look at...
2
by: PRS | last post by:
Why does 'SELECT * FROM countries' truncate characters and SELECT country FROM countries does not ? mysql> SELECT * FROM countries; +-------------+-----------+ | country | capital |...
1
by: Flack | last post by:
Hey guys, I need to compare two times that the user selects. The user selects the hour, date, and timezone (which can be either NY, LN, or HK timezones). How can I compare two dates of...
7
by: =?Utf-8?B?U3R1?= | last post by:
I have a ASP.NET Ajax app (using client library) calling ASP.NET Ajax-enabled web services. We are making use of the javascript proxies generated by ASP.NET Ajax. The problem we have is that the...
3
by: Daz | last post by:
Hello everyone. I am creating a JavaScript project which will allow users to see what time it is in other countries. I am wondering if there's any way to have the server work this out, without...
7
by: David T. Ashley | last post by:
In a web database (PHP), per user, I'd like to allow each user to specify their timezone (this would change how times are adjusted for display for that user). How do I enumerate all possible...
27
by: Sanjay | last post by:
Hi All, I am using pytz.common_timezones to populate the timezone combo box of some user registration form. But as it has so many timezones (around 400), it is a bit confusing to the users. Is...
6
by: patrick.waldo | last post by:
Hi all, I'm analyzing some data that has a lot of country data. What I need to do is sort through this data and output it into an excel doc with summary information. The countries, though,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.