diff options
author | Florian Ludwig <f.ludwig@greyrook.com> | 2020-10-24 10:32:10 +0200 |
---|---|---|
committer | Florian Ludwig <f.ludwig@greyrook.com> | 2020-10-24 10:32:10 +0200 |
commit | b35956e07885ff147991c7dfd31039bbea7ca5e0 (patch) | |
tree | 3f64bd9c6e2510ea4c68c3e96baac7ec2abfb8da | |
parent | dde9db804d30fe0ab0c3291c105093ed691b0ef4 (diff) | |
download | rdflib-b35956e07885ff147991c7dfd31039bbea7ca5e0.tar.gz |
Do not use current time in sparql TIMEZONE
Calculating the timezone should use date date and time from the
datetime object the timezone is requested from instead from the
current time. This makes a difference if the timezone for the given
location has changed in the past. In this particular case it is probably
not possible as iso 8601 seems not have a method to specify the
time zone via a location.
-rw-r--r-- | rdflib/plugins/sparql/operators.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rdflib/plugins/sparql/operators.py b/rdflib/plugins/sparql/operators.py index 29bdd5c0..228b0c28 100644 --- a/rdflib/plugins/sparql/operators.py +++ b/rdflib/plugins/sparql/operators.py @@ -492,7 +492,7 @@ def Builtin_TIMEZONE(e, ctx): if not dt.tzinfo: raise SPARQLError("datatime has no timezone: %r" % dt) - delta = dt.tzinfo.utcoffset(ctx.now) + delta = dt.utcoffset() d = delta.days s = delta.seconds |