summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2018-06-04 15:46:31 +0200
committerAllen Winter <allen.winter@kdab.com>2018-08-04 11:58:12 -0400
commit513fcf7be005a5c1a513d7f3dfc2a3b7c7549635 (patch)
treed6f654306058ee40ded08350277498923560cf6f /scripts
parentcdda3acd0da7c5cc903c28e7219c035ae3e584eb (diff)
downloadlibical-git-513fcf7be005a5c1a513d7f3dfc2a3b7c7549635.tar.gz
TZID on DATE-TIME value can override time specified in UTC
When DTSTART, DTEND, DUE and EXDATE properties had times specified in UTC (with the 'Z' suffix) and they also contained a TZID parameter for a different time zone, then this TZID overwrote the UTC time, which could lead to missed exceptions (and other issues). The icalproperty_get_exdate() code had been incomplete too, thus that is fixed as well, by using the same function for timezone lookup as the other properties. Signed-off-by: Allen Winter <allen.winter@kdab.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkderivedproperties.pl25
1 files changed, 2 insertions, 23 deletions
diff --git a/scripts/mkderivedproperties.pl b/scripts/mkderivedproperties.pl
index 2f28bdab..450cac94 100755
--- a/scripts/mkderivedproperties.pl
+++ b/scripts/mkderivedproperties.pl
@@ -285,29 +285,8 @@ EOM
print <<EOM;
$type icalproperty_get_${lc}(const icalproperty *prop)
{
-#ifndef _MSC_VER
- struct icaltimetype itt;
- icalparameter *param;
- icaltimezone *zone;
-#endif
- icalerror_check_arg((prop != 0), "prop");
-#ifndef _MSC_VER
- /*
- * Code by dirk\@objectpark.net:
- * Set the time zone manually. I am really puzzled that
- * it doesnot work automatically like in the other functions
- * like icalproperty_get_dtstart().
- */
- itt = icalvalue_get_datetime(icalproperty_get_value(prop));
- param = icalproperty_get_first_parameter((icalproperty *)prop, ICAL_TZID_PARAMETER);
- if (param) {
- zone = icaltimezone_get_builtin_timezone(icalparameter_get_tzid(param));
- (void)icaltime_set_timezone(&itt, zone);
- }
- return itt;
-#else
- return icalvalue_get_datetime(icalproperty_get_value(prop));
-#endif
+ icalerror_check_arg((prop != 0), "prop");
+ return icalproperty_get_datetime_with_component((icalproperty *)prop, NULL);
}
EOM