Results 1 to 4 of 4
  1. #1

    Unhappy Help me to get country time code...

    Hello, Can anyone help me to get "Country time" code. Like In game we can see like this '' Current US(any country) time is 12.00 PM.

  2. #2
    Super Moderator
    Join Date
    Jul 2010
    Very North Darwin
    no idea.

  3. #3
    Community Contributor
    Join Date
    Nov 2011
    Well, first you have to know where your server (procon layer) is and which time zone it is in. Then, you need to figure out your player's time zone or the time zone of the country they ask for. Then, you need count how many time zones are between those two locations and add or subtract hours from your server's time depending on how many time zones apart they are. Then, you need to add or subtract daylight savings time depending on if it is currently daylight savings time in your server's time zone, or currently daylight savings time in the player's time zone.

    It becomes VERY complicated because some countries have 1 hour time zones or 0.5 hour time zones or 0.25 hour time zones, some countries recognize daylight savings time and some countries don't, some countries recognize daylight savings time at different times of the year, some countries leap forward at daylight savings time and some countries leap backwards at daylight savings time depending on if they are north or south of the equator, and some people follow different time zones in the same country depending on their race and beliefs. Some countries change their time zone or change their daylight savings time observance preferences randomly in the middle of the year.

    Basically, you need to create a list of every country in the world, their time zone, and whether or not you need to add or subtract hours or partial hours on certain dates depending on their daylight savings time preference. Then, you need to constantly monitor world politics and modify your list whenever something changes.

    In summary, it is not at all an easy task. On the surface, it seems like an easy task. But then, as you get into it, you start seeing how hard it becomes. You can make it sort of accurate and sort of work without much effort, but if you want it to be very accurate, it gets very difficult.

    For you to enjoy:
    The Problem with Time & Timezones - Computerphile
    Last edited by ty_ger07; 06-04-2016 at 05:03.

  4. #4
    you can show the server time,date etc to each player when they join very easily but to show each players own time showing on join... well, thats gonna give you brain overflow for a while



Tags for this Thread

Posting Permissions

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