summaryrefslogtreecommitdiff
path: root/test%252525252525253fid%252525252525253d3f267d0473b1e34c858edac334e17bf48c0c4...
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-10-31 15:23:41 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2018-11-10 12:19:28 +0100
commit4263a2850431b7328699c713b4e97667f9ba02e2 (patch)
treec15245e7187be4f081a90e851e77ae7093e8af64 /test%252525252525253fid%252525252525253d3f267d0473b1e34c858edac334e17bf48c0c407d%2525252525253fid%2525252525253de3ca60eefe08b253ff436fe16d85b4317c7a2523%25252525253fid%25252525253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48%252525253fid%252525253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48&id2%252525253d4263a2850431b7328699c713b4e97667f9ba02e2%2525253fid%2525253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48&id2%2525253d4263a2850431b7328699c713b4e97667f9ba02e2%25253fid%25253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48&id2%25253d4263a2850431b7328699c713b4e97667f9ba02e2%253fid%253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48&id2%253d4263a2850431b7328699c713b4e97667f9ba02e2%3fid%3de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48?id=4263a2850431b7328699c713b4e97667f9ba02e2
parentf91b7cdee0efb7af2989eed56b6e3248da2b6712 (diff)
DST fix: adjusting time in appointments
Calcurse saves time and date information on disk as local time in readable text file format. When loaded from disk or when entered by the user, local time is converted to Unix time (seconds since 00:00:00, 1 January 1970). When displayed, and later when saved to disk, the Unix time is converted back to readable local time. Both conversions depend on DST. Hence, if midnight for a day with DST in effect (i.e. local time) is converted, increased with an amount and converted back, the amount has changed if DST is _not_ in effect for the resulting time. In general, calculations on Unix time variables should be used with caution because of the DST-dependent conversions. Instead, the calculations should be performed on local time data with the help of mktime(). The commit fixes start time for pasted appointments (ordinary and recurrent) and the 'until'-date of recurrent appointments, pasted as well as new and edited. The latter problem is slightly different in that the adjustment is a number of days, as it is for exception dates. Update of the date in parse_datetime() has been corrected to be similar to update of the time, although no problem has been identified. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'test%252525252525253fid%252525252525253d3f267d0473b1e34c858edac334e17bf48c0c407d%2525252525253fid%2525252525253de3ca60eefe08b253ff436fe16d85b4317c7a2523%25252525253fid%25252525253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48%252525253fid%252525253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48&id2%252525253d4263a2850431b7328699c713b4e97667f9ba02e2%2525253fid%2525253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48&id2%2525253d4263a2850431b7328699c713b4e97667f9ba02e2%25253fid%25253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48&id2%25253d4263a2850431b7328699c713b4e97667f9ba02e2%253fid%253de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48&id2%253d4263a2850431b7328699c713b4e97667f9ba02e2%3fid%3de6cffdc6bd58e0ddefbb0b21e8bbe841963bce48?id=4263a2850431b7328699c713b4e97667f9ba02e2')
0 files changed, 0 insertions, 0 deletions