#ruby - 19 November 2018
« Back 1 day
[07:20:29] marz_d`ghostman: I'm trying to test the format of logger, is there like a test specific stream I can use instead of a file?
[17:13:19] Aces1up: hey all i have been searching around but can not find an answer to this. when i save a datetime to column in rails I know it saves it as utc.. How can I later do a query on that datetime to see if it has passed a certain time in another timezone?
[17:13:19] Aces1up: <aces1up> it is as simple as querying the database using a datetime object set with a different timezone and AR knows what to do from there?
[17:18:03] RougeR: aces1up, https://stackoverflow.com/questions/28872761/time-zone-storage-in-data-type-timestamp-with-time-zone/28876266#28876266
[17:18:37] RougeR: could be that you have to write a sql method otherwise you are going to be doing the checks in rails
[17:23:20] Aces1up: right now i have an app where i was storing all things as unix timestamp, now i need to adapt it to retreieve stuff based on biz location / timezone
[17:26:10] Aces1up: or should i just switch over everything to date time object so AR can do queries against timezone of business?
[17:27:02] Aces1up: its polling businesses for new leads that come in.. so i have a cron job running every 30 secs.
[17:29:12] Aces1up: sure let me know your thoughts if i can adapt just Timestamps to work with timezones.
[17:29:37] Aces1up: i guess i need to convert the timestamp to time object then convert to timezone but then how would I do a query with all those conversions.
[19:00:19] rubydoc: OpenSSL::SSL::Session#timeout, Object#timeout, Timeout.timeout, WEBrick::Utils.timeout
[19:01:03] rubydoc: https://ruby-doc.org/stdlib-2.5.3/libdoc/timeout/rdoc/Object.html#method-i-timeout