Countries and TimeZones

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Countries and TimeZones

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

    People can enter the data at [url]http://www.rs-data.at/martin/eingabe.html[/url]
    (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?
    Martin Brunner Guest

  2. Similar Questions and Discussions

    1. Why does 'SELECT * FROM countries' truncate characters and SELECT country FROM countries does not ?
      Hi, Why does 'SELECT * FROM countries' truncate characters and SELECT country FROM countries does not ? mysql> SELECT * FROM countries;...
    2. How to make now() and different timezones get along
      As my title and summary suggest, I just started using the now function, mainly for keeping track of when users last logged in. The question is, how...
    3. Countries Database - a little OT
      Does anyone know of a freely downloadable list of all the countries in the world. Any format I can pull into SQL server. Regards.
    4. Converting Time between timezones?
      Hi, ruby comes with the standard unix time conversion functions such as gmtime and localtime. Is there a simple method to convert time into...
    5. [PHP] Timezones and Daylight Savings Time
      What if you set the server to use UTC and then used the clients local system setting to offset it for each client? So the server would have it's...
  3. #2

    Default Re: Countries and TimeZones

    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:
    [url]http://de3.php.net/manual/en/function.time.php[/url]
    --
    ________________________________
    Monika E. L. Beisel
    Universität Kaiserslautern
    E-Mail: [email]beisel@rhrk.uni-kl.de[/email]

    Monika Beisel Guest

  4. #3

    Default Re: Countries and TimeZones

    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.
    Martin Brunner Guest

  5. #4

    Default Re: Countries and TimeZones



    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: [email]beisel@rhrk.uni-kl.de[/email]

    Monika Beisel Guest

  6. #5

    Default Re: Countries and TimeZones

    Martin Brunner <mbrunner@mcnon.com> wrote in news:bkmcdt$3dpi5$1@ID-
    819.news.uni-berlin.de:
    > [url]http://www.rs-data.at/martin/ausgabe.html[/url]
    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
    Don Crossman Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139