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)
- Unhandled exception in notify/discord
- Docker - Cannot connect to transmission: Connection timed out. HOT 1
- Transmission-rpc version issues in latest docker image HOT 2
- imdb_lookup 403
- fix cgi deprecation warning
- next_sonarr_episode crash since upgrade url v3
- unknown url type error should NOT be reported for magnet URIs
- Quality plugin <hdr not working HOT 6
- Scheduler crashing in latest version ( Cannot pickle a ZoneInfo file from a file stream ) HOT 1
- [help] Plugins > Notifiers > email possible to send email with from name/header
- BUG: Unhandled error in plugin series: '<' not supported between instances of 'Episode' and 'Episode'
- movie_list without CLI
- Hyphen in the Episode/ID Regexp (Reopening #2865)
- all rss feed items are downloaded every times rss feed is fetched HOT 5
- filter seen doesn't work if fields changed HOT 7
- Solved: ".config-lock was found" ; Flexget Docker container stuck in "restarting (1) x# of seconds ago"
- IRC Python 3.12 compatibility
- How To Make Flexget Check ifA Local paht
- FlexGet stopped updating my imdb_watchlist HOT 6
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.