Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0001065SOGoWeb Calendarpublic2018-04-27 10:09
Reportercharlie2 Assigned Tofrancis  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.3.4 
Fixed in Version2.3.5 
Summary0001065: Calendar weeks are wrong
Description

Hi,

i think the calculation of the calendar weeks is wrong.
When i have a look today in the week view of the Web calendar i see that we have week 1. But we still have week 52.
When i change the setting of calendar "First week of year" to "First 4-day week", then we have week 0.

Regards,
Chris

TagsNo tags attached.

Relationships

duplicate of 0001010 resolvedfrancis "Week 0" in week view... 

Activities

wimmer

wimmer

2011-03-17 13:53

reporter   ~0002266

I can confirm this bug.
SOGo WebGUI shows week number 12 now, but it is 11.

SOGo should use Unix system command 'date "+%V" which returns correct number of the week in ISO 8601.
You could find interesting table on
http://www.pjh2.de/datetime/weeknumber/wnc.php?l=en#Legend
I consider ISO 8601 for the best variant.

wimmer

wimmer

2011-03-24 17:38

reporter   ~0002295

Aha - now I found I had not set any SOGoFirstWeekOfYear variable, so defalut value "January1" is using. That is wrong for Czech Rep.
When I set it to "First4DayWeek", Calendar week is fine for all users who didn't save their preferences in WebGUI in the past. For them I can do:

  • sogo-tool backup
  • change SOGoFirstWeekOfYear = First4DayWeek;
  • sogo-tool -p restore

and it will be ok for all.

Milos

Christian Mack

Christian Mack

2012-06-18 12:36

developer   ~0004052

Instead of backup and restore you can iterate through each user with a wrong setting:

[sogo@machine ~]$ /usr/sbin/sogo-tool user-preferences set defaults ${userID} SOGoFirstWeekOfYear First4DayWeek

With this you don't rely on the user to not edit his account data while changing this preference.

wimmer

wimmer

2012-06-18 13:37

reporter   ~0004057

I tried it, but I got following error [on SOGo-1.3.16]

/usr/local/sbin/sogo-tool user-preferences set defaults kur SOGoFirstWeekOfYear First4DayWeek
Jun 18 15:34:30 sogo-tool [6421]: <0x0xae7200[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
Jun 18 15:34:30 sogo-tool [6421]: <0x0xae7200[SOGoCache]> Using host(s) 'localhost' as server(s)
Jun 18 15:34:30 sogo-tool [6421]: [ERROR] <0x0x942790[GSCBufferString]> json parser: Unrecognised leading character, attempting once more after unescaping...
Jun 18 15:34:30 sogo-tool [6421]: [ERROR] <0x0x942790[GSCBufferString]> total failure. Original string is: First4DayWeek
2012-06-18 15:34:30.294 sogo-tool[6421] Invalid JSON input - no changes performed in the database. The supplied value was: First4DayWeek

ludovic

ludovic

2012-06-18 13:51

administrator   ~0004058

You must provide JSON input to sogo-tool.

First, do a "get" and understand what you're trying to set, then do it.

wimmer

wimmer

2012-06-18 14:04

reporter   ~0004059

I tried to find something about it documentation - I didn't find.
'sogo-tool --help' doesn't provide any information about JSON or get.
(and I don't want to analyze source code for this now).

ludovic

ludovic

2012-06-18 14:16

administrator   ~0004060

sogo-tool user-preferences get ...

Christian Mack

Christian Mack

2012-06-18 15:42

developer   ~0004063

Sorry, should have been precise:

/usr/sbin/sogo-tool user-preferences set defaults ${userID} SOGoFirstWeekOfYear '{"SOGoFirstWeekOfYear": "First4DayWeek"}'

Issue History

Date Modified Username Field Change
2010-12-30 19:18 charlie2 New Issue
2011-03-17 13:53 wimmer Note Added: 0002266
2011-03-24 17:38 wimmer Note Added: 0002295
2012-06-18 12:36 Christian Mack Note Added: 0004052
2012-06-18 13:37 wimmer Note Added: 0004057
2012-06-18 13:51 ludovic Note Added: 0004058
2012-06-18 14:04 wimmer Note Added: 0004059
2012-06-18 14:16 ludovic Note Added: 0004060
2012-06-18 15:42 Christian Mack Note Added: 0004063
2015-12-22 19:26 francis Relationship added duplicate of 0001010
2015-12-22 19:26 francis Status new => resolved
2015-12-22 19:26 francis Fixed in Version => 2.3.5
2015-12-22 19:26 francis Resolution open => fixed
2015-12-22 19:26 francis Assigned To => francis