Development > Topic

times and dates in streber / #2514

Oct 17, 2006 / pixtur
Sep 12, 2007 / don django
 

Attached files

Summary
streber_times.png
streber_times.png

6771 bytes / ID 2515 / Oct 17, 2006
Show Details
 
Streber stores all dates in the database as GMT string in the form "2006-10-13 23:23:23". This GMT times are displayed in the local time zone of the client. To do this we need to know the time zone offset to from the client's computer to the server.

Autodetection

To solve this problem without having the user adjust his time zone, streber tries to guess. On login it computes the current local time with Javascript and then compares this time with the current server time. This time offset is then stored for each person in the person table time_offset-field.

Additionally this table provides a time_zone for each user. By default this is set to TIME_OFFSET_AUTO (25) which enables the autodetection. However this could be overwritten by setting this a any other timezone from -12 to +12. (open task: add time zone drop down list to person profil).

If you have Admin or Project Manager-rights, you can compare local / server time and time offset by clicking on "system info" at the footer.

streber_times.png


7 Comments

binder

Oct 18, 2006
please make this a fixed option in profile
see add time zone drop down list to person profil

we had a bit of side effects in a few revisions from SVN. the time-offset was not calculated in hourly (or half-hourly?) steps. So we had in booked efforts crude dates like 16:09 tilll 18:09; but the user explicitly put in 16:00 till 18:00! This was perhaps because the server clock was 9min. late!?

Problem is solved forever, if every user has the time-offset in his profile!

pixtur

Oct 18, 2006
Reply to please make this a fixed option in profile
Very interessting side effect. Never thought about this one. Yes, the user should have the time zone setting in his profil (it's not a big deal). But I would leave autodetection the default.

binder

Oct 18, 2006
version 2
Antwort auf Reply to please make this a fixed option in profile
we have this effect still in current release! ;)

this time with -1 minute! ;) all effort dates are 11:59 instead 12:00! ;)

making it static or automatic in profile is OK.

pixtur

Oct 18, 2006

guest

Sep 11, 2007
Question
How I change 12 to 24 on time view?

guest

Sep 11, 2007
Question
How I change 12 to 24 on time view?

don django

Sep 12, 2007
This are my first steps
This is really impressimg
 

Comment / Update