[Kstars-devel] Review Request: Daylight Savings Time saving correction

Marta Rybczyńska kde-i18n at rybczynska.net
Sat Aug 27 21:08:11 UTC 2011



> On Aug. 26, 2011, 12:53 a.m., Akarsh Simha wrote:
> > kstars/kstarsdata.cpp, line 354
> > <http://git.reviewboard.kde.org/r/102316/diff/1/?file=31916#file31916line354>
> >
> >     Okay, I had a look into the code. I see that with the way the TimeZoneRule class is currently structured, there's no better way of doing this. 
> >     
> >     However, I would think that a better way to do this would be to have the TimeZoneRule class know what key it corresponds to, i.e. store a QString m_TZRuleKey in class TimeZoneRule which is set up in the constructor. Then modify the line in KStarsData::readTimeZoneRuleBook() that instantiates TimeZoneRule to use the new constructor with 'key' as an argument. Then, one would rewrite this bugfix as: Options::setDST( m_Geo.tzrule()->getTZRuleKey() );
> >     You could implement that if you like. Else, I'll go ahead and sign this for you / you can go ahead and commit it, IMO.

I committed it in master and 4.7 branch "as is". I'll work on refactoring TimeZoneRule to make the solution better (it is not the only place where the key would be useful).


- Marta


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102316/#review6016
-----------------------------------------------------------


On Aug. 13, 2011, 6:53 p.m., Marta Rybczyńska wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102316/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2011, 6:53 p.m.)
> 
> 
> Review request for KStars.
> 
> 
> Summary
> -------
> 
> This patch fixes an old bug. It turns out that DST (Daylight Savings Time) setting was not saved and that resulted with no DST correction (fallback "--" DST rule when all other location information is correct) when the program was run again. The workaround was to enter Settings->Geographic and click OK.
> 
> The patch adds change of the DST field in Option when the location is changed, that leads to the new value to be saved.
> 
> In the case of a configuration without DST saved, the configuration will be fixed next time the location is changed, also when the user follows the existing workaround.
> 
> Implementation explanation:
> The patch uses a loop, because at this point we do not have the rule name, which is to be saved. Further work will be to keep the rule name in the TimeZoneRule class and refactor this code and other similar places accordingly.
> 
> 
> This addresses bug 209647.
>     http://bugs.kde.org/show_bug.cgi?id=209647
> 
> 
> Diffs
> -----
> 
>   kstars/kstarsdata.cpp 2303c5f 
> 
> Diff: http://git.reviewboard.kde.org/r/102316/diff
> 
> 
> Testing
> -------
> 
> Tested with a config file with and without DST settings, multiple location changes etc. Works fine.
> 
> 
> Thanks,
> 
> Marta
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20110827/97deb015/attachment.html>


More information about the Kstars-devel mailing list