Comments (6)
Sounds feasible. Would you be willing to take a look on a possible solution? Do you see that happening to other dates in sidekiq like in the retries tab? Don't have the time to look into that for a few weeks but would be happy to merge a PR.
from sidekiq-failures.
I'll try and have a look this weekend during RailsCamp AU.
from sidekiq-failures.
@Soliah Did you figure it out? I ran into the same issue.
I found a solution coolzilj/sidekiq-failures@498d297, but just can't understand why it solve this problem?
from sidekiq-failures.
@Soliah @mhfs
I think I understand why the hell this happening now.
My system time zone is 'CST' (China Standard Time)
Time.now.getutc.iso8601
=> "2013-09-27T05:28:49Z" (Correct!)
Time.parse(Time.now.strftime("%Y/%m/%d %H:%M:%S %Z")).getutc.iso8601
=> "2013-09-27T19:29:42Z" (This is what I got in sidekiq-failures, and IT IS WRONG!)
In Time::parse
doc
Since there are numerous conflicts among locally defined time zone abbreviations all over the world, this method is not intended to understand all of them. For example, the abbreviation βCSTβ is used variously as:
-06:00 in America/Chicago,
-05:00 in America/Havana,
+08:00 in Asia/Harbin,
+09:30 in Australia/Darwin,
+10:30 in Australia/Adelaide,
etc.
Based on this fact, this method only understands the time zone abbreviations described in RFC 822 and the system time zone, in the order named. (i.e. a definition in RFC 822 overrides the system time zone definition.) The system time zone is taken from Time.local(year, 1, 1).zone and Time.local(year, 7, 1).zone. If the extracted time zone abbreviation does not match any of them, it is ignored and the given time is regarded as a local time.
In RFC 822 doc
zone = / "CST" / "CDT" ; Central: - 6/ - 5
CST
means Central Standard Time (North America),
so Time.parse(Time.now.strftime("%Y/%m/%d %H:%M:%S %Z")).getutc.iso8601
this method would treat
'CST' (China Standard Time) as CST
(Central Standard Time (North America)).
So what I got is totally wrong.
My solution is just use Time.parse(Time.now.strftime("%Y/%m/%d %H:%M:%S")).getutc.iso8601
,
then Time::parse
would use the local time.
refs:
from sidekiq-failures.
nice!
from sidekiq-failures.
I decided to keep everything UTC as Sidekiq seems to do. Thanks for the help.
from sidekiq-failures.
Related Issues (20)
- Failures Tab Not Available After Adding Gem HOT 3
- ActiveJob integration HOT 4
- Deleting all failed items when on last page redirects back to same page
- Can't see failed jobs in failures tab HOT 3
- Works with Sidekiq v4? HOT 4
- NoMethodError: undefined method `size' for nil:NilClass HOT 2
- Make work with Sidekiq 5.0 HOT 20
- TypeError: no implicit conversion of Integer into String HOT 1
- To display sidekiq failures in chronological order
- Clearing Failures Not Working
- rack (2.2.3) NoMethodError (undefined method `bytesize' for 404:Integer HOT 1
- Any way to see the backtrace? HOT 1
- Cut a release with the failures fix in HOT 3
- Retry middleware not instantiated properly. HOT 3
- Expanding the failed job's description doesn't show the rest of the text
- Possible XSS with this gem HOT 1
- Sidekiq 7 boot troubles with failures_max_count unavailable. HOT 3
- rubygems not installing v1.0.4
- incompatibility with sidekiq_unique_jobs due to safe_relative_time implementation HOT 2
- Cannot access Locks page after upgrade to Sidekiq v7
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 sidekiq-failures.