SOGo | BTS

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001065SOGoWeb Calendarpublic2010-12-30 14:182018-04-27 06:09
Reportercharlie2 
Assigned Tofrancis 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.3.4 
Target VersionFixed in Version2.3.5 
Summary0001065: Calendar weeks are wrong
DescriptionHi,

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.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
duplicate of 0001010resolvedfrancis "Week 0" in week view... 

-  Notes
(0002266)
wimmer (reporter)
2011-03-17 09:53

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.
(0002295)
wimmer (reporter)
2011-03-24 13:38

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
User avatar (0004052)
Christian Mack (developer)
2012-06-18 08:36

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.
(0004057)
wimmer (reporter)
2012-06-18 09:37

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
User avatar (0004058)
ludovic (administrator)
2012-06-18 09:51

You must provide JSON input to sogo-tool.

First, do a "get" and understand what you're trying to set, then do it.
(0004059)
wimmer (reporter)
2012-06-18 10:04

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).
User avatar (0004060)
ludovic (administrator)
2012-06-18 10:16

sogo-tool user-preferences get ...
User avatar (0004063)
Christian Mack (developer)
2012-06-18 11:42

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 14:18 charlie2 New Issue
2011-03-17 09:53 wimmer Note Added: 0002266
2011-03-24 13:38 wimmer Note Added: 0002295
2012-06-18 08:36 Christian Mack Note Added: 0004052
2012-06-18 09:37 wimmer Note Added: 0004057
2012-06-18 09:51 ludovic Note Added: 0004058
2012-06-18 10:04 wimmer Note Added: 0004059
2012-06-18 10:16 ludovic Note Added: 0004060
2012-06-18 11:42 Christian Mack Note Added: 0004063
2015-12-22 14:26 francis Relationship added duplicate of 0001010
2015-12-22 14:26 francis Status new => resolved
2015-12-22 14:26 francis Fixed in Version => 2.3.5
2015-12-22 14:26 francis Resolution open => fixed
2015-12-22 14:26 francis Assigned To => francis


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker