collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Timezone problem  (Read 3803 times)

0 Members and 1 Guest are viewing this topic.

Offline benninger

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Timezone problem
« on: January 24, 2008, 04:11:18 pm »
Hello! I am running the bot using Windows Server 2003.
Each log entry (e.g. tower attacks) shows the time one hour less than it is.
Hmm, means:
January 24th, 2008 13:45 - IT-LE-SA (Talker, 15 Enforcer) attacked Semper Talis in Aegean (x2, L 11 - 16).
The attack startdt 14:45.

Where can I ajust this in the bot?
The Server is configured GMT+1

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Timezone problem
« Reply #1 on: January 24, 2008, 04:45:22 pm »
the bot uses GMT time

far as i know there is no setting for adding offset

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Timezone problem
« Reply #2 on: January 25, 2008, 01:43:22 am »
the bot uses GMT time

far as i know there is no setting for adding offset

Indeed. Rubi-Ka Universal Time (AKA GMT or UTC time) should match that of what the bot displays. (Shift+F11?). There are way to many timezones and different rules to follow, and there is no guarantee that everyone in your org is living in the same time zone...or if they are living in the same time zone there is no guarantee that they follow the same rules.

A great example is Arizona in the states. The state has elected to not follow the US Daylight Savings Time rules, however the Navajo Nation Reservation which is spread across multiple states follows daylight savings time so that the entire Navajo nation is in sync. Try programming this and every other exception to the rules into your program and you'll quickly find you're making mistakes and timestamps are way off, and it becomes a general mess.

And that's what Coordinated Universal Time (AKA UTC time) is for. UTC is also referred to by the military and civil aviation as Zulu time. GMT is an old term that should be equivalent, but there are many time implementations that mistakenly list GMT time as UTC+1 during European Summer Time, which will create no end to frustration when you try and coordinate across time zones.

I've found that the best solution for dealing with this in code is converting UTC time to a UNIX time stamp and shoving that as an integer (not timestamp) into the database. (A Unix Time Stamp is the number of seconds elapsed since midnight UTC of January 1, 1970, not counting leap seconds.) That way you can be sure your code will always play by the expected set of time rules instead of the rules of your database, or Operating System, or whatever...

Even though a Unix timestamp is not UTC time, it is generally accurate enough given that clock drift between systems is inevitable.

Hope that gives you an understanding of why the bot follows UTC time and not your local time zone. :D

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 375
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal