Comments (5)
Oh, were you comparing some parsed date to another? That indeed isn't working at the moment if only one specified a timezone.
tasks:
a_task:
mock:
- title: someentry
set:
somedate: "2023-12-31T00:00:00+03:00"
otherdate: "2023-12-31"
somecomparison: "{{somedate|parsedate < otherdate|parsedate}}"
from flexget.
Good catch. parsedate
indeed needs to be updated to use the compatibility class that allows comparing naive to offset aware datetimes. That being said, utcnow and now should already have that feature so I would expect your example to work already. Are you on the latest version? (There were a couple other fixes after the initial merge.) If so, can you give some more details of you example so I can understand how both sides of the comparison somehow avoided getting our custom compatibility layer? Just want to make sure I'm fixing in all the places needed.
Here's the quick test I did which was already working.
tasks:
a_task:
mock:
- title: someentry
set:
somedate: "2023-12-31"
somecomparison: "{{somedate|parsedate < utcnow}}"
from flexget.
This commit will almost certainly fix your issue. I'd like to understand exactly the situation you were running in to though still to make sure all edge cases are captured.
from flexget.
This commit will almost certainly fix your issue. I'd like to understand exactly the situation you were running in to though still to make sure all edge cases are captured.
Yeah, I was comparing two parsedate
's, one originated from the new utcnow
and thus had timezone information, and the other didn't.
If I were to start from scratch then I would consider timezones for all dates but now I have to deal with the information that I have in the DB so the compat layer is welcome. Thanks!
from flexget.
Ahh, gotcha. Yep, this will fix your issue.
from flexget.
Related Issues (20)
- Failure to connect to Transmission causes unhandled exception HOT 2
- transmission-rpc version requirements HOT 4
- Passthepopcorn search plugin can crash rather than freshly log in when a saved cookie is bad HOT 2
- Can't talk to my Telegram bot using the Telegram notifier HOT 1
- Feature Request: Develop a plugin for Download Station (Synology) HOT 1
- Plugin imdb fails to filter? HOT 10
- Any way to change the time in "Tasks - Latest Executions" from GMT to local time? HOT 1
- Support newer setuptools HOT 1
- libtorrent package required HOT 5
- Unable to download the RSS tag with YGGTORRENT HOT 1
- IRC Error.
- Can Flexget add or subtract a number from a series ID? HOT 1
- zoneinfo._common.ZoneInfoNotFoundError: tzlocal() does not support non-zoneinfo timezones like Europe/Madrid.
- Season Pack not Being Identified as Such HOT 1
- Duplicate movie lists causing "Multiple rows were found when exactly one was required" HOT 2
- pendulum-3.0.0 Dependency HOT 13
- [I need help]
- Unhandled exception in notify/discord
- Docker - Cannot connect to transmission: Connection timed out. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexget.