aboutsummaryrefslogtreecommitdiffstats
path: root/src/ragel
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-12-23 12:23:40 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-12-23 14:56:09 +0200
commit9cb2f11b0a34d2bcbc4a0c1fb11596bcfeed4db3 (patch)
treef20b7ce7df5a5429d4b3b4f58df943810639093c /src/ragel
parentc10a012a44a1c40df0e90511f745af0b7377a665 (diff)
downloadrspamd-9cb2f11b0a34d2bcbc4a0c1fb11596bcfeed4db3.tar.gz
rspamd-9cb2f11b0a34d2bcbc4a0c1fb11596bcfeed4db3.zip
[Fix] Date header timezone adjustments (#1279)
Diffstat (limited to 'src/ragel')
-rw-r--r--src/ragel/smtp_date.rl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ragel/smtp_date.rl b/src/ragel/smtp_date.rl
index 25e1ea3c0..6830506cd 100644
--- a/src/ragel/smtp_date.rl
+++ b/src/ragel/smtp_date.rl
@@ -79,16 +79,16 @@
}
}
action TZ_Sign {
- tmp = p - 1;
+ tmp = p;
}
action TZ_Offset_Start {
}
action TZ_Offset_End {
if (p > tmp + 1) {
- rspamd_strtoul (tmp + 1, p - tmp - 1, (gulong *)&tz);
+ rspamd_strtoul (tmp + 1, p - tmp, (gulong *)&tz);
- if (*tmp == '-') {
+ if (*(tmp - 1) == '-') {
tz = -(tz);
}
}
@@ -189,6 +189,6 @@
"MST" %TZ_MST | "MDT" %TZ_MDT |
"PST" %TZ_PST | "PDT" %TZ_PDT |
[a-iA-I] | [k-zK-Z];
- time = time_of_day %DT_End (zone | obs_zone %Obs_Zone_End);
+ time = time_of_day %DT_End (zone | obs_zone %Obs_Zone_End) FWS*;
date_time = (day_of_week ",")? date time;
-}%% \ No newline at end of file
+}%%