From jon.list+rb at gmail.com Sun Oct 2 20:27:09 2011 From: jon.list+rb at gmail.com (Jonathon Brenner) Date: Sun, 2 Oct 2011 20:27:09 -0400 Subject: [raleigh.rb] Ruby opportunities In-Reply-To: <015301cc7f84$0e981400$2bc83c00$@hirenetworks.com> References: <015301cc7f84$0e981400$2bc83c00$@hirenetworks.com> Message-ID: I'm interested in the Raleigh postings. Can you please send me more information? Jonathon On Fri, Sep 30, 2011 at 11:17 AM, Kendra Andrews wrote: > I have several Ruby openings for direct hire opportunities with clients. > Looking for people in Raleigh, Charlotte or Gaithersburg, MD, or at least > open to moving to those areas. MD client will sponsor, the others will not. > Jobs are all different so reach out to me if you?d like some details. *** > * > > ** ** > > Thanks!**** > > ** ** > > *Kendra Andrews*** > > Director of Recruiting**** > > HireNetworks**** > > 919-981-6200 x313**** > > 888-334-3145**** > > kandrews at hirenetworks.com**** > > www.hirenetworks.com**** > > ** ** > > [image: Description: Description: Description: Description: linkedin_32] > [image: Description: Description: Description: Description: facebook_32] > [image: Description: Description: Description: Description: twitter_32] > **** > > ** ** > > [image: Description: Description: Description: Description: Description: > Best Places to Work 2010]**** > > ** ** > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 993 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 1012 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 3042 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 1073 bytes Desc: not available URL: From thomas at ravinggenius.com Sun Oct 2 21:14:44 2011 From: thomas at ravinggenius.com (Thomas Ingram) Date: Sun, 2 Oct 2011 21:14:44 -0400 Subject: [raleigh.rb] Ruby opportunities In-Reply-To: References: <015301cc7f84$0e981400$2bc83c00$@hirenetworks.com> Message-ID: I am also interested in Raleigh postings. Any information would be welcome. On Sun, Oct 2, 2011 at 20:27, Jonathon Brenner wrote: > > I'm interested in the Raleigh postings. Can you please send me more information? > Jonathon > > On Fri, Sep 30, 2011 at 11:17 AM, Kendra Andrews wrote: >> >> I have several Ruby openings for direct hire opportunities with clients. Looking for people in Raleigh, Charlotte or Gaithersburg, MD, or at least open to moving to those areas. MD client will sponsor, the others will not.? Jobs are all different so reach out to me if you?d like some details. -- Thomas Ingram ><> From adrian at x-omega.com Tue Oct 4 13:57:24 2011 From: adrian at x-omega.com (Adrian Dunston) Date: Tue, 4 Oct 2011 13:57:24 -0400 Subject: [raleigh.rb] SAS Job Number Change Message-ID: Quick update: The job number for the SAS job I posted has changed to 11002876. Please apply and email me so I can help fast-track your resume. http://www.sas.com/jobs/USjobs/search.html Job Number: 11002876 Thanks, Adrian -------------- ORIGINAL MESSAGE ----------------- I work at SAS Institute, Inc. One of my teammates just transferred out of our group. (His former group needed his skills, so he decided to pitch in there.) We're now looking for a Rails developer. If you are a talented developer with impressive Ruby on Rails experience, please go to the above link, search on the job number, apply, and email me. I'm not an HR representative, and I'm not speaking on behalf of the company. I'm just a guy who wants to work with great people. My experience with the members of this list is very positive, so if I can help get your resume in front of folks at SAS, I'll do it. This is a great company. SAS is Fortune Magazine's best place to work in the US http://money.cnn.com/magazines/fortune/bestcompanies/2011/snapshots/1.html. It's a tech company owned and led by a tech guy. Great benefits. 35 hour work week. One office per developer; no cubes. And the corporation is not a tyrant about side-projects. I have a startup idea that I work on at home. Just to be safe, I ran it by legal. They sent me a letter saying that as long as I didn't bring my project into the office, SAS wouldn't try to assert ownership, etc. I know many there are a lot of entrepreneurial folks on this list. My experience is SAS not getting huffy about entrepreneurial endeavors. (My experiences at IBM were somewhat different.) The manager is very good. I've worked at SAS for five years under this guy. Prior to that, I've worked for dot coms and tiny consulting companies. I've had good bosses, and a not-very-good boss. This guy's fantastic. He's forward-thinking. He listens. He cares about how much gets accomplished but isn't focused on time-sheets and chair-warming. I invented the project I'm working on, got his support, decided to use Ruby on Rails, and that was it. As long as I'm contributing to the team and keeping him informed, I have a ton of autonomy and always feel like my boss is behind me. The work is fun. Our team writes the deployment tools. The Rails project gathers product data from around the company for use in our deployment tools. The job posting makes the job seem more Java-heavy than I think it will be. I spend most of my time designing and writing features for the Rails app. We use the Agile Scrum methodology. I can't go into detail, but it's fun and exciting work with talented people. So if you're interested, please apply and send me an email. I'll pass your name to my manager, so he's sure to look at your resume. Thanks, Adrian Dunston -------------- next part -------------- An HTML attachment was scrubbed... URL: From ken.auer at rolemodelsoftware.com Thu Oct 6 01:40:25 2011 From: ken.auer at rolemodelsoftware.com (Ken Auer) Date: Thu, 6 Oct 2011 01:40:25 -0400 Subject: [raleigh.rb] Rails and iOS development... developer needed. Message-ID: I'm looking to hire someone who already has some iOS development under their belt and also is at least familiar with Rails. I've got a lot of clients lining up to do Mobile apps, and RoleModel Software is ready to expand in a variety of ways, and I'm really looking for someone to add to our Core Team to build the iOS center of our practice around. RoleModel Software is... - A premiere Software Craftsmanship shop based in Holly Springs with an emphasis on serving customers over ?mutual admiration society? (but we do admire one another) and believes: - A craftsman is going to invest in his tools - Someone who wants to be part of a team invests in the team - And what the team/business is doing - These values are reflected by its Core Team RoleModel Software's Core Team is... - Focused on Software Craftsmanship in the context of making RoleModel more effective, profitable, and forward-looking - Continuously striving to improve craft - Continuously striving to serve client - Continuously striving to meet commitments to each other - ... in context of ?a healthy Christ-honoring life? RoleModel Software's Core Team shares... - Responsibility (more important than personal preferences, but we honor personal preferences) - Risk/Reward (short-term and long-term compensation and potential compensation, but we are happy to negotiate both the risk and reward) - Commitment (doing what we mutually say we will do, but not pushing someone to commit to what they cannot deliver) How does one get on RoleModel's Core Team? - Desire to be on the core team and - Convince me you will be a good core team member - Spends a day and more with us to determine if the above two are both in place - Negotiate a deal that works for both parties - With potential quarterly profit sharing - Auto renewable each quarter, unless we agree to a new deal... If you think you might be interested, and that I might be interested in you, drop me a note and let's take it forward from there. Ken -- Ken Auer Software Craftsman RoleModel Software 919-557-7550 (v) 6720 RoleModel Way 626-544-2015 (f) Holly Springs, NC 27540 919-622-8315 (m) "Christianity is not a plug-in, it's an operating system" (see Mark 12:28-31) -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke at ehresman.org Thu Oct 6 09:45:34 2011 From: luke at ehresman.org (Luke Ehresman) Date: Thu, 6 Oct 2011 09:45:34 -0400 Subject: [raleigh.rb] New MongoDB meetup Message-ID: I've just launched the Mongo Raleigh meetup for those interested in the open source, non-relational, "nosql" database MongoDB. Our first meeting will be Tuesday, Nov 8. http://www.meetup.com/MongoRaleigh/ >From discussions I've had with many of you, I think there may be cross interest with this group, hence the announcement. Cheers, Luke -- Luke Ehresman, luke at ehresman.org CopperEgg - http://copperegg.com Tebros Systems - http://tebros.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From javery at infozerk.com Wed Oct 12 17:51:56 2011 From: javery at infozerk.com (James Avery) Date: Wed, 12 Oct 2011 17:51:56 -0400 Subject: [raleigh.rb] Triangle AWS Meetup Message-ID: There is a new meetup in the Triangle focused on Amazon Web Services - it's been meeting for a couple months and the previous talks have been great. The focus is on startups and companies sharing how they use AWS, what challenges they have had, and a decent amount of open discussion about architecture choices, issues, etc. The next meeting is tomorrow night and we meet in Durham (just north of downtown, I swear it's mostly safe). ;) http://taws.me/2011/09/meeting-3-trying-for-best-practices.html Also - free pizza and beer! -James -- James Avery Adzerk - http://adzerk.com TekPub - http://tekpub.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke at ehresman.org Thu Oct 13 10:00:05 2011 From: luke at ehresman.org (Luke Ehresman) Date: Thu, 13 Oct 2011 10:00:05 -0400 Subject: [raleigh.rb] simulating api requests Message-ID: My app is journaling requests made to our Rails-based REST API, and I'm writing a script to replay these later for testing and recovery purposes. In a command line script (that has the Rails environment loaded), how can I simulate controller actions like I do in test scripts with get/post/put methods? Thanks, Luke -- Luke Ehresman, luke at ehresman.org CopperEgg - http://copperegg.com Tebros Systems - http://tebros.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke at ehresman.org Thu Oct 13 11:12:50 2011 From: luke at ehresman.org (Luke Ehresman) Date: Thu, 13 Oct 2011 11:12:50 -0400 Subject: [raleigh.rb] simulating api requests In-Reply-To: References: Message-ID: I've decided to actually replay against the api itself using the rest-client gem. On Thu, Oct 13, 2011 at 10:00 AM, Luke Ehresman wrote: > My app is journaling requests made to our Rails-based REST API, and I'm > writing a script to replay these later for testing and recovery purposes. > > In a command line script (that has the Rails environment loaded), how can I > simulate controller actions like I do in test scripts with get/post/put > methods? > > Thanks, > Luke > > -- > Luke Ehresman, luke at ehresman.org > CopperEgg - http://copperegg.com > Tebros Systems - http://tebros.com > > -- Luke Ehresman, luke at ehresman.org CopperEgg - http://copperegg.com Tebros Systems - http://tebros.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tj at stank.us Thu Oct 13 11:24:32 2011 From: tj at stank.us (TJ Stankus) Date: Thu, 13 Oct 2011 11:24:32 -0400 Subject: [raleigh.rb] simulating api requests In-Reply-To: References: Message-ID: It might be easiest to shell out to curl from your ruby script, and use curl to issue get/post. There may be a better way; this is just the first thing that popped into my head. HTH, -TJ On Thu, Oct 13, 2011 at 10:00 AM, Luke Ehresman wrote: > My app is journaling requests made to our Rails-based REST API, and I'm > writing a script to replay these later for testing and recovery purposes. > In a command line script (that has the Rails environment loaded), how can I > simulate controller actions like I do in test scripts with get/post/put > methods? > Thanks, > Luke > > -- > Luke Ehresman,?luke at ehresman.org > CopperEgg - http://copperegg.com > Tebros Systems - http://tebros.com > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > From donald.ball at gmail.com Thu Oct 13 11:31:04 2011 From: donald.ball at gmail.com (Donald Ball) Date: Thu, 13 Oct 2011 11:31:04 -0400 Subject: [raleigh.rb] simulating api requests In-Reply-To: References: Message-ID: I'm not sure there's an easy way of doing that. Mightn't it be more elegant to simply replay the requests over HTTP using mechanize or some other scriptable HTTP agent? -- donald From duff at omelia.org Thu Oct 13 12:05:20 2011 From: duff at omelia.org (Duff OMelia) Date: Thu, 13 Oct 2011 12:05:20 -0400 Subject: [raleigh.rb] simulating api requests In-Reply-To: References: Message-ID: > My app is journaling requests made to our Rails-based REST API, and I'm > writing a script to replay these later for testing and recovery purposes. Thought I might mention this, in case it helps: https://github.com/myronmarston/vcr ------------------------------------------------------------ Duff OMelia From mshiltonj at gmail.com Tue Oct 18 08:58:38 2011 From: mshiltonj at gmail.com (Steven Hilton) Date: Tue, 18 Oct 2011 08:58:38 -0400 Subject: [raleigh.rb] Time vs ActiveSupport::TimeWithZone Message-ID: Hello all, I'm seeing unexpected timestamp formatting and don't know if it's a bug or intentional behavior. Has anyone else seen this? I have an app where the system is set to Eastern Time Zone. The app is configured like so: [...] config.time_zone = "Eastern Time (US & Canada)" config.active_record.default_timezone = "Eastern Time (US & Canada)" [...] Here is what I expect, using Time rails console Loading development environment (Rails 3.1.0) irb(main):004:0> t = Time.local(2008, 06, 14) => 2008-06-14 00:00:00 -0400 irb(main):005:0> t.to_formatted_s(:db) => "2008-06-14 00:00:00" This looks good. However, when I do the same thing with ActiveSupport::TimeWithZone, I get this: t = Time.zone.local(2008, 06, 14) => Sat, 14 Jun 2008 00:00:00 EDT -04:00 irb(main):009:0> t.class => ActiveSupport::TimeWithZone irb(main):010:0> t.to_formatted_s(:db) => "2008-06-14 04:00:00" ## It's suddenly 4 am. Even though the time is in Eastern time, and Rails is configured to use Eastern, the returned formatted string is ... unexpected. Why is this? in active_support/time_with_zone.rb, the time is unilaterally converted to utc before stringification if the format is :db 166 def to_s(format = :default) 167 if format == :db 168 utc.to_s(format) ## <-- RIGHT HERE 169 elsif formatter = ::Time::DATE_FORMATS[format] 170 formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter) 171 else 172 "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s format 173 end 174 end 175 alias_method :to_formatted_s, :to_s Other formats work okay: irb(main):002:0> t.to_formatted_s :short => "14 Jun 00:00" Does this make any sense? Thanks! - Steven From harry.park at gmail.com Tue Oct 18 09:03:16 2011 From: harry.park at gmail.com (Harry Park) Date: Tue, 18 Oct 2011 09:03:16 -0400 Subject: [raleigh.rb] Time vs ActiveSupport::TimeWithZone In-Reply-To: References: Message-ID: Seems a pretty standard way to store time in the DB. Store it as UTC in the DB otherwise you have to keep track of time zones and weird stuff like daylight savings and what not. When you output that data to the user, you can format it to their needs, such as time zone, daylight savings, etc. HTH On Tue, Oct 18, 2011 at 8:58 AM, Steven Hilton wrote: > Hello all, > > I'm seeing unexpected timestamp formatting and don't know if it's a > bug or intentional behavior. Has anyone else seen this? > > I have an app where the system is set to Eastern Time Zone. The app > is configured like so: > > [...] > config.time_zone = "Eastern Time (US & Canada)" > config.active_record.default_timezone = "Eastern Time (US & Canada)" > [...] > > Here is what I expect, using Time > > rails console > Loading development environment (Rails 3.1.0) > irb(main):004:0> t = Time.local(2008, 06, 14) > => 2008-06-14 00:00:00 -0400 > irb(main):005:0> t.to_formatted_s(:db) > => "2008-06-14 00:00:00" > > This looks good. However, when I do the same thing with > ActiveSupport::TimeWithZone, I get this: > > t = Time.zone.local(2008, 06, 14) > => Sat, 14 Jun 2008 00:00:00 EDT -04:00 > irb(main):009:0> t.class > => ActiveSupport::TimeWithZone > irb(main):010:0> t.to_formatted_s(:db) > => "2008-06-14 04:00:00" ## It's suddenly 4 am. > > > Even though the time is in Eastern time, and Rails is configured to > use Eastern, the returned formatted string is ... unexpected. > > Why is this? in active_support/time_with_zone.rb, the time is > unilaterally converted to utc before stringification if the format is > :db > > 166 def to_s(format = :default) > 167 if format == :db > 168 utc.to_s(format) ## <-- RIGHT HERE > 169 elsif formatter = ::Time::DATE_FORMATS[format] > 170 formatter.respond_to?(:call) ? formatter.call(self).to_s : > strftime(formatter) > 171 else > 172 "#{time.strftime("%Y-%m-%d %H:%M:%S")} > #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s > format > 173 end > 174 end > 175 alias_method :to_formatted_s, :to_s > > Other formats work okay: > > irb(main):002:0> t.to_formatted_s :short > => "14 Jun 00:00" > > Does this make any sense? > > Thanks! > > - Steven > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mshiltonj at gmail.com Tue Oct 18 10:08:53 2011 From: mshiltonj at gmail.com (Steven Hilton) Date: Tue, 18 Oct 2011 10:08:53 -0400 Subject: [raleigh.rb] Time vs ActiveSupport::TimeWithZone In-Reply-To: References: Message-ID: On Tue, Oct 18, 2011 at 9:03 AM, Harry Park wrote: > Seems a pretty standard way to store time in the DB. Store it as UTC in the > DB otherwise you have to keep track of time zones and weird stuff like > daylight savings and what not. Yes, this is very true. It is often the highlight of my day when I deal with such issues. /s But that's not really the issue here. The code samples I used here don't do any database interaction. It's just formatting an EDT date object, and is behaving differently than the Time object. Regarding the db, though... use of Time#to_formatted_s :db seems to assume/require that the db time stamps be in UTC, despite rails configuration options allowing us declare otherwise. > When you output that data to the user, you can format it to their needs, > such as time zone, daylight savings, etc. > HTH > > On Tue, Oct 18, 2011 at 8:58 AM, Steven Hilton wrote: >> >> Hello all, >> >> I'm seeing unexpected timestamp formatting and don't know if it's a >> bug or intentional behavior. Has anyone else seen this? >> >> I have an app where the system is set to Eastern Time Zone. ? The app >> is configured like so: >> >> ? [...] >> ? config.time_zone = "Eastern Time (US & Canada)" >> ? config.active_record.default_timezone = "Eastern Time (US & Canada)" >> ? [...] >> >> Here is what I expect, using Time >> >> ? rails console >> ? Loading development environment (Rails 3.1.0) >> ? irb(main):004:0> t = Time.local(2008, 06, 14) >> ? => 2008-06-14 00:00:00 -0400 >> ? irb(main):005:0> t.to_formatted_s(:db) >> ? => "2008-06-14 00:00:00" >> >> This looks good. However, when I do the same thing with >> ActiveSupport::TimeWithZone, I get this: >> >> ? t = Time.zone.local(2008, 06, 14) >> ? => Sat, 14 Jun 2008 00:00:00 EDT -04:00 >> ? irb(main):009:0> t.class >> ? => ActiveSupport::TimeWithZone >> ? irb(main):010:0> t.to_formatted_s(:db) >> ? => "2008-06-14 04:00:00" ? ? ? ? ? ## It's suddenly 4 am. >> >> >> Even though the time is in Eastern time, and Rails is configured to >> use Eastern, the returned formatted string is ... unexpected. >> >> Why is this? in active_support/time_with_zone.rb, the time is >> unilaterally converted to utc before stringification if the format is >> :db >> >> 166 ? ? def to_s(format = :default) >> 167 ? ? ? if format == :db >> 168 ? ? ? ? utc.to_s(format) ?## <-- RIGHT HERE >> 169 ? ? ? elsif formatter = ::Time::DATE_FORMATS[format] >> 170 ? ? ? ? formatter.respond_to?(:call) ? formatter.call(self).to_s : >> strftime(formatter) >> 171 ? ? ? else >> 172 ? ? ? ? "#{time.strftime("%Y-%m-%d %H:%M:%S")} >> #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s >> format >> 173 ? ? ? end >> 174 ? ? end >> 175 ? ? alias_method :to_formatted_s, :to_s >> >> Other formats work okay: >> >> ? irb(main):002:0> t.to_formatted_s :short >> ? => "14 Jun 00:00" >> >> Does this make any sense? >> >> Thanks! >> >> - Steven >> _______________________________________________ >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > From steve at iannopollo.com Tue Oct 18 10:37:48 2011 From: steve at iannopollo.com (Steve Iannopollo) Date: Tue, 18 Oct 2011 10:37:48 -0400 Subject: [raleigh.rb] Time vs ActiveSupport::TimeWithZone In-Reply-To: References: Message-ID: <7B0BF508-595B-4C23-9C39-4AB3CB5536F3@iannopollo.com> I don't think this is the fault of the TimeWithZone object: pry(main)> Time.zone = 'Eastern Time (US & Canada)' => "Eastern Time (US & Canada)" pry(main)> t = Time.zone.local(2008, 06, 14) => Sat, 14 Jun 2008 00:00:00 EDT -04:00 pry(main)> t.to_formatted_s(:db) => "2008-06-14 04:00:00" pry(main)> t.strftime "%Y-%m-%d %H:%M:%S" => "2008-06-14 00:00:00" It looks like you need to find out what the :db format is doing to the time object. I would imagine it's converting the time to UTC before calling strftime on it, something like t.utc.strftime "%Y-%m-%d %H:%M:%S" -Steve On Oct 18, 2011, at 8:58 AM, Steven Hilton wrote: > Hello all, > > I'm seeing unexpected timestamp formatting and don't know if it's a > bug or intentional behavior. Has anyone else seen this? > > I have an app where the system is set to Eastern Time Zone. The app > is configured like so: > > [...] > config.time_zone = "Eastern Time (US & Canada)" > config.active_record.default_timezone = "Eastern Time (US & Canada)" > [...] > > Here is what I expect, using Time > > rails console > Loading development environment (Rails 3.1.0) > irb(main):004:0> t = Time.local(2008, 06, 14) > => 2008-06-14 00:00:00 -0400 > irb(main):005:0> t.to_formatted_s(:db) > => "2008-06-14 00:00:00" > > This looks good. However, when I do the same thing with > ActiveSupport::TimeWithZone, I get this: > > t = Time.zone.local(2008, 06, 14) > => Sat, 14 Jun 2008 00:00:00 EDT -04:00 > irb(main):009:0> t.class > => ActiveSupport::TimeWithZone > irb(main):010:0> t.to_formatted_s(:db) > => "2008-06-14 04:00:00" ## It's suddenly 4 am. > > > Even though the time is in Eastern time, and Rails is configured to > use Eastern, the returned formatted string is ... unexpected. > > Why is this? in active_support/time_with_zone.rb, the time is > unilaterally converted to utc before stringification if the format is > :db > > 166 def to_s(format = :default) > 167 if format == :db > 168 utc.to_s(format) ## <-- RIGHT HERE > 169 elsif formatter = ::Time::DATE_FORMATS[format] > 170 formatter.respond_to?(:call) ? formatter.call(self).to_s : > strftime(formatter) > 171 else > 172 "#{time.strftime("%Y-%m-%d %H:%M:%S")} > #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s > format > 173 end > 174 end > 175 alias_method :to_formatted_s, :to_s > > Other formats work okay: > > irb(main):002:0> t.to_formatted_s :short > => "14 Jun 00:00" > > Does this make any sense? > > Thanks! > > - Steven > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members From mshiltonj at gmail.com Tue Oct 18 11:38:53 2011 From: mshiltonj at gmail.com (Steven Hilton) Date: Tue, 18 Oct 2011 11:38:53 -0400 Subject: [raleigh.rb] Time vs ActiveSupport::TimeWithZone In-Reply-To: <7B0BF508-595B-4C23-9C39-4AB3CB5536F3@iannopollo.com> References: <7B0BF508-595B-4C23-9C39-4AB3CB5536F3@iannopollo.com> Message-ID: Yes, that is what it is doing. I know the what and the where. As I posted below, it's on line 168 of active_support/time_with_zone.rb. And it doesn't seem right. Here's another example: Time.zone = 'Eastern Time (US & Canada)' t = Time.parse('2008-06-14 10:00:00 -0400') puts t.to_formatted_s :db zones = [ 'UTC', 'Pacific Time (US & Canada)', 'Eastern Time (US & Canada)', 'Amsterdam', 'Moscow', 'Sydney' ] zones.each do |z| puts "Time zone: #{z}" Time.zone = z puts " to_formatted_s(:short) : #{t.in_time_zone.to_formatted_s :short}" puts " to_formatted_s(:db) : #{t.in_time_zone.to_formatted_s :db}" end This is my output: rails runner test.rb 2008-06-14 10:00:00 Time zone: UTC to_formatted_s(:short) : 14 Jun 14:00 to_formatted_s(:db) : 2008-06-14 14:00:00 Time zone: Pacific Time (US & Canada) to_formatted_s(:short) : 14 Jun 07:00 to_formatted_s(:db) : 2008-06-14 14:00:00 Time zone: Eastern Time (US & Canada) to_formatted_s(:short) : 14 Jun 10:00 to_formatted_s(:db) : 2008-06-14 14:00:00 Time zone: Amsterdam to_formatted_s(:short) : 14 Jun 16:00 to_formatted_s(:db) : 2008-06-14 14:00:00 Time zone: Moscow to_formatted_s(:short) : 14 Jun 18:00 to_formatted_s(:db) : 2008-06-14 14:00:00 Time zone: Sydney to_formatted_s(:short) : 15 Jun 00:00 to_formatted_s(:db) : 2008-06-14 14:00:00 And I'm afraid some time objects might be being run through a call to to_formatted_s(:db) somewhere in the rails internals becuase I'm still getting inconsistent behavior elsewhere it the application. I'm still investigating, but there's no question that my timestamps are getting shifted and/or reparsed somewhere and the epoch time is getting moved. On Tue, Oct 18, 2011 at 10:37 AM, Steve Iannopollo wrote: > I don't think this is the fault of the TimeWithZone object: > > pry(main)> Time.zone = 'Eastern Time (US & Canada)' > => "Eastern Time (US & Canada)" > pry(main)> t = Time.zone.local(2008, 06, 14) > => Sat, 14 Jun 2008 00:00:00 EDT -04:00 > pry(main)> t.to_formatted_s(:db) > => "2008-06-14 04:00:00" > pry(main)> t.strftime "%Y-%m-%d %H:%M:%S" > => "2008-06-14 00:00:00" > > It looks like you need to find out what the :db format is doing to the time object. I would imagine it's converting the time to UTC before calling strftime on it, something like > > t.utc.strftime "%Y-%m-%d %H:%M:%S" > -Steve > > On Oct 18, 2011, at 8:58 AM, Steven Hilton wrote: > >> Hello all, >> >> I'm seeing unexpected timestamp formatting and don't know if it's a >> bug or intentional behavior. Has anyone else seen this? >> >> I have an app where the system is set to Eastern Time Zone. ? The app >> is configured like so: >> >> ? [...] >> ? config.time_zone = "Eastern Time (US & Canada)" >> ? config.active_record.default_timezone = "Eastern Time (US & Canada)" >> ? [...] >> >> Here is what I expect, using Time >> >> ? rails console >> ? Loading development environment (Rails 3.1.0) >> ? irb(main):004:0> t = Time.local(2008, 06, 14) >> ? => 2008-06-14 00:00:00 -0400 >> ? irb(main):005:0> t.to_formatted_s(:db) >> ? => "2008-06-14 00:00:00" >> >> This looks good. However, when I do the same thing with >> ActiveSupport::TimeWithZone, I get this: >> >> ? t = Time.zone.local(2008, 06, 14) >> ? => Sat, 14 Jun 2008 00:00:00 EDT -04:00 >> ? irb(main):009:0> t.class >> ? => ActiveSupport::TimeWithZone >> ? irb(main):010:0> t.to_formatted_s(:db) >> ? => "2008-06-14 04:00:00" ? ? ? ? ? ## It's suddenly 4 am. >> >> >> Even though the time is in Eastern time, and Rails is configured to >> use Eastern, the returned formatted string is ... unexpected. >> >> Why is this? in active_support/time_with_zone.rb, the time is >> unilaterally converted to utc before stringification if the format is >> :db >> >> 166 ? ? def to_s(format = :default) >> 167 ? ? ? if format == :db >> 168 ? ? ? ? utc.to_s(format) ?## <-- RIGHT HERE >> 169 ? ? ? elsif formatter = ::Time::DATE_FORMATS[format] >> 170 ? ? ? ? formatter.respond_to?(:call) ? formatter.call(self).to_s : >> strftime(formatter) >> 171 ? ? ? else >> 172 ? ? ? ? "#{time.strftime("%Y-%m-%d %H:%M:%S")} >> #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s >> format >> 173 ? ? ? end >> 174 ? ? end >> 175 ? ? alias_method :to_formatted_s, :to_s >> >> Other formats work okay: >> >> ? irb(main):002:0> t.to_formatted_s :short >> ? => "14 Jun 00:00" >> >> Does this make any sense? >> >> Thanks! >> >> - Steven >> _______________________________________________ >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > From mshiltonj at gmail.com Tue Oct 18 11:52:36 2011 From: mshiltonj at gmail.com (Steven Hilton) Date: Tue, 18 Oct 2011 11:52:36 -0400 Subject: [raleigh.rb] Time vs ActiveSupport::TimeWithZone In-Reply-To: References: <7B0BF508-595B-4C23-9C39-4AB3CB5536F3@iannopollo.com> Message-ID: On Tue, Oct 18, 2011 at 11:38 AM, Steven Hilton wrote: > And I'm afraid some time objects might be being run through a call to > to_formatted_s(:db) somewhere in the rails internals becuase I'm still > getting inconsistent behavior elsewhere it the application. I'm still > investigating, but there's no question that my timestamps are getting > shifted and/or reparsed somewhere and the epoch time is getting moved. I don't see any place in the internals where to_formatted_s is being called, but there may be somewhere else a time stamp is being converted to utc and parsed and the epoch getting moved. As I said, I'm still getting inconsistent behavior.. - Steven From steve at iannopollo.com Tue Oct 18 12:09:07 2011 From: steve at iannopollo.com (Steve Iannopollo) Date: Tue, 18 Oct 2011 12:09:07 -0400 Subject: [raleigh.rb] Time vs ActiveSupport::TimeWithZone In-Reply-To: References: Message-ID: <94EE4E0C-6547-4788-B323-116C5EB8AD36@iannopollo.com> Wow, it would help if I read the 2nd half of your email. Looks like I repeated what you already knew :-) On Oct 18, 2011, at 8:58 AM, Steven Hilton wrote: > Hello all, > > I'm seeing unexpected timestamp formatting and don't know if it's a > bug or intentional behavior. Has anyone else seen this? > > I have an app where the system is set to Eastern Time Zone. The app > is configured like so: > > [...] > config.time_zone = "Eastern Time (US & Canada)" > config.active_record.default_timezone = "Eastern Time (US & Canada)" > [...] > > Here is what I expect, using Time > > rails console > Loading development environment (Rails 3.1.0) > irb(main):004:0> t = Time.local(2008, 06, 14) > => 2008-06-14 00:00:00 -0400 > irb(main):005:0> t.to_formatted_s(:db) > => "2008-06-14 00:00:00" > > This looks good. However, when I do the same thing with > ActiveSupport::TimeWithZone, I get this: > > t = Time.zone.local(2008, 06, 14) > => Sat, 14 Jun 2008 00:00:00 EDT -04:00 > irb(main):009:0> t.class > => ActiveSupport::TimeWithZone > irb(main):010:0> t.to_formatted_s(:db) > => "2008-06-14 04:00:00" ## It's suddenly 4 am. > > > Even though the time is in Eastern time, and Rails is configured to > use Eastern, the returned formatted string is ... unexpected. > > Why is this? in active_support/time_with_zone.rb, the time is > unilaterally converted to utc before stringification if the format is > :db > > 166 def to_s(format = :default) > 167 if format == :db > 168 utc.to_s(format) ## <-- RIGHT HERE > 169 elsif formatter = ::Time::DATE_FORMATS[format] > 170 formatter.respond_to?(:call) ? formatter.call(self).to_s : > strftime(formatter) > 171 else > 172 "#{time.strftime("%Y-%m-%d %H:%M:%S")} > #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s > format > 173 end > 174 end > 175 alias_method :to_formatted_s, :to_s > > Other formats work okay: > > irb(main):002:0> t.to_formatted_s :short > => "14 Jun 00:00" > > Does this make any sense? > > Thanks! > > - Steven > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members From joe at bodkinconsulting.com Wed Oct 19 09:59:40 2011 From: joe at bodkinconsulting.com (joe Fair) Date: Wed, 19 Oct 2011 09:59:40 -0400 Subject: [raleigh.rb] Notes from last night? Message-ID: Group, I was bummed to miss the talk last night. Would anybody care to re-cap -What employers want -What developers want Thanks, Joe From cjstingl at gmail.com Wed Oct 19 10:17:17 2011 From: cjstingl at gmail.com (Christopher Stingl) Date: Wed, 19 Oct 2011 10:17:17 -0400 Subject: [raleigh.rb] Notes from last night? In-Reply-To: References: Message-ID: <15B038CA2A8644A98DED6F693AFD400B@gmail.com> I would like a re-cap myself CHRISTOPHER STINGL RAWR 1319 center street apex nc 27502 t +1 919 995 1452 e cjstingl at gmail.com On Wednesday, October 19, 2011 at 9:59 AM, joe Fair wrote: > Group, > > I was bummed to miss the talk last night. Would anybody care to re-cap > -What employers want > -What developers want > > Thanks, > Joe > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org (mailto:raleigh-rb-members at rubyforge.org) > http://rubyforge.org/mailman/listinfo/raleigh-rb-members -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at cranehouse.net Wed Oct 19 11:35:02 2011 From: eric at cranehouse.net (Eric Crane) Date: Wed, 19 Oct 2011 11:35:02 -0400 Subject: [raleigh.rb] Notes from last night? In-Reply-To: References: Message-ID: <3FD603C8-9FF2-49A8-A924-59188C277575@cranehouse.net> I'll take a stab at adding a few notes. There was a lot of really good discussion. On some points people seemed to be in agreement, and on others there was a diversity of opinion. I apologize in advance if I mis-represent any particular opinion. If I do so it is entirely unintentional. There seemed to be some universal agreement that the job market right now favors Ruby Developers looking for work and that finding Ruby talent is hard. I think all those hiring look at a person as either a good developer or not, regardless of languages. Some would only hire someone with specific Ruby experience while others would also recruit PHP/Phython/Java/etc talent as well. Some skills that seemed important were initiative, continual learning, testing, process, and other such ancillary skills. There seemed to be some bias against a developer who does not have contributions on github. Some thought this a stronger point than others. Most felt that networking and word of mouth were much better for hiring than other means. Scorn and derision were heaped on the mention of job boards. There also seemed to be varying views on using recruiters with some people never using them and others using them some. There was some discussion about hiring recent grads and how many comp sci grads are ill prepared for the real world. A few folks talked about about being stuck in Java (or other) jobs and why they were not switching yet. But I don't recall a lot of discussion about what they were looking for in a Ruby job. That's some stuff off the top of my head. Can anyone else add to it? On Oct 19, 2011, at 9:59 AM, joe Fair wrote: > Group, > > I was bummed to miss the talk last night. Would anybody care to re-cap > -What employers want > -What developers want > > Thanks, > Joe > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -- Eric Crane www.cranehouse.net eric at cranehouse.net From ken.auer at rolemodelsoftware.com Wed Oct 19 19:47:21 2011 From: ken.auer at rolemodelsoftware.com (Ken Auer) Date: Wed, 19 Oct 2011 19:47:21 -0400 Subject: [raleigh.rb] CocoaConf coming to Raleigh 12/1-3 Message-ID: Hey, I know this is a Ruby mailing list, but also know that a lot of Ruby folks are also interested in mobile stuff and use a Mac. I attended CocoaConf in Columbus this summer and was so impressed with it that I decided to sponsor it to come to Raleigh. [Full disclosure, I don't get any kickbacks for more people signing up, but you will see our company's logo]. The lineup of speakers they have are top notch and it is an intimate setting where you actually get to interact with them. You may not get a chance to interact with this caliber of talent in the Cocoa world in Raleigh anytime soon. Don't miss it. http://cocoaconf.com... early bird pricing ends October 31. Ken -- Ken Auer Software Craftsman RoleModel Software 919-557-7550 (v) 6720 RoleModel Way 626-544-2015 (f) Holly Springs, NC 27540 919-622-8315 (m) "Christianity is not a plug-in, it's an operating system" (see Mark 12:28-31) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jareds.lists at gmail.com Fri Oct 21 11:16:24 2011 From: jareds.lists at gmail.com (Jared Richardson) Date: Fri, 21 Oct 2011 11:16:24 -0400 Subject: [raleigh.rb] Free Indie Conf Ticket Message-ID: I know this isn't a Ruby topic, but we've got so many independent Rubyist on the list, I thought this might be of interest. I've got a free IndieConf ticket to give away. Tell me what your favorite session might be and score it http://indieconf.com/sessions/ It's a great local conference with topics ranging from finance to public speaking and more. cc http://twitter.com/#!/jaredrichardson/status/127378427480260608 You can reply to me personally or on twitter. Jared http://AgileArtisans.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From harry.park at gmail.com Sat Oct 22 23:55:10 2011 From: harry.park at gmail.com (Harry Park) Date: Sat, 22 Oct 2011 20:55:10 -0700 Subject: [raleigh.rb] Free Indie Conf Ticket In-Reply-To: References: Message-ID: <5F850BA1-667A-4BA6-BEF9-6287ECFB1DBB@gmail.com> Freelance money geek session gets my vote. Is this a single context conf? Definitely interested in this conf now. Sent from my iPhone 4s On Oct 21, 2011, at 8:16 AM, Jared Richardson wrote: > I know this isn't a Ruby topic, but we've got so many independent Rubyist on the list, I thought this might be of interest. > > I've got a free IndieConf ticket to give away. Tell me what your favorite session might be and score it http://indieconf.com/sessions/ > > It's a great local conference with topics ranging from finance to public speaking and more. > > cc http://twitter.com/#!/jaredrichardson/status/127378427480260608 > > You can reply to me personally or on twitter. > > Jared > http://AgileArtisans.com > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members -------------- next part -------------- An HTML attachment was scrubbed... URL: From jareds.lists at gmail.com Sun Oct 23 14:04:42 2011 From: jareds.lists at gmail.com (Jared Richardson) Date: Sun, 23 Oct 2011 14:04:42 -0400 Subject: [raleigh.rb] Free Indie Conf Ticket In-Reply-To: <5F850BA1-667A-4BA6-BEF9-6287ECFB1DBB@gmail.com> References: <5F850BA1-667A-4BA6-BEF9-6287ECFB1DBB@gmail.com> Message-ID: Single context? I'm afraid all the tickets I had have been given away. I do have a discount code though. jrichardson30 It's good for 30% off, but but I'm not sure how long it'll be live. It's related to how many people use the code. :) Jared http://AgileArtisans.com On Sat, Oct 22, 2011 at 11:55 PM, Harry Park wrote: > Freelance money geek session gets my vote. > > Is this a single context conf? Definitely interested in this conf now. > > Sent from my iPhone 4s > > On Oct 21, 2011, at 8:16 AM, Jared Richardson > wrote: > > I know this isn't a Ruby topic, but we've got so many independent Rubyist > on the list, I thought this might be of interest. > > I've got a free IndieConf ticket to give away. Tell me what your favorite > session might be and score it http://indieconf.com/sessions/ > > It's a great local conference with topics ranging from finance to public > speaking and more. > > cc http://twitter.com/#!/jaredrichardson/status/127378427480260608 > > You can reply to me personally or on twitter. > > Jared > http://AgileArtisans.com > > _______________________________________________ > > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -------------- next part -------------- An HTML attachment was scrubbed... URL: From harry.park at gmail.com Sun Oct 23 17:00:04 2011 From: harry.park at gmail.com (Harry Park) Date: Sun, 23 Oct 2011 14:00:04 -0700 Subject: [raleigh.rb] Free Indie Conf Ticket In-Reply-To: References: <5F850BA1-667A-4BA6-BEF9-6287ECFB1DBB@gmail.com> Message-ID: <4F028794-1B44-48E5-A16B-8BCDAFBBC700@gmail.com> Oops meant single track. Yeah that makes more sense Sent from my iPhone 4s On Oct 23, 2011, at 11:04 AM, Jared Richardson wrote: > Single context? > > I'm afraid all the tickets I had have been given away. I do have a discount code though. jrichardson30 It's good for 30% off, but but I'm not sure how long it'll be live. It's related to how many people use the code. :) > > Jared > http://AgileArtisans.com > > On Sat, Oct 22, 2011 at 11:55 PM, Harry Park wrote: > Freelance money geek session gets my vote. > > Is this a single context conf? Definitely interested in this conf now. > > Sent from my iPhone 4s > > On Oct 21, 2011, at 8:16 AM, Jared Richardson wrote: > >> I know this isn't a Ruby topic, but we've got so many independent Rubyist on the list, I thought this might be of interest. >> >> I've got a free IndieConf ticket to give away. Tell me what your favorite session might be and score it http://indieconf.com/sessions/ >> >> It's a great local conference with topics ranging from finance to public speaking and more. >> >> cc http://twitter.com/#!/jaredrichardson/status/127378427480260608 >> >> You can reply to me personally or on twitter. >> >> Jared >> http://AgileArtisans.com >> _______________________________________________ >> >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members -------------- next part -------------- An HTML attachment was scrubbed... URL: From jareds.lists at gmail.com Mon Oct 24 08:42:55 2011 From: jareds.lists at gmail.com (Jared Richardson) Date: Mon, 24 Oct 2011 08:42:55 -0400 Subject: [raleigh.rb] Free Indie Conf Ticket In-Reply-To: <4F028794-1B44-48E5-A16B-8BCDAFBBC700@gmail.com> References: <5F850BA1-667A-4BA6-BEF9-6287ECFB1DBB@gmail.com> <4F028794-1B44-48E5-A16B-8BCDAFBBC700@gmail.com> Message-ID: Gotcha. It wasn't single track last year. I'm not sure how many concurrent sessions there were, but I think it was 3 to 5. I was in my own session and wasn't able to spend much time browsing before or after last year, but I know that Matt Bass and I were speaking at the same time. :) Jared http://AgileArtisans.com On Sun, Oct 23, 2011 at 5:00 PM, Harry Park wrote: > Oops meant single track. Yeah that makes more sense > > > Sent from my iPhone 4s > > On Oct 23, 2011, at 11:04 AM, Jared Richardson > wrote: > > Single context? > > I'm afraid all the tickets I had have been given away. I do have a discount > code though. jrichardson30 It's good for 30% off, but but I'm not sure > how long it'll be live. It's related to how many people use the code. :) > > Jared > http://AgileArtisans.com > > On Sat, Oct 22, 2011 at 11:55 PM, Harry Park wrote: > >> Freelance money geek session gets my vote. >> >> Is this a single context conf? Definitely interested in this conf now. >> >> Sent from my iPhone 4s >> >> On Oct 21, 2011, at 8:16 AM, Jared Richardson >> wrote: >> >> I know this isn't a Ruby topic, but we've got so many independent Rubyist >> on the list, I thought this might be of interest. >> >> I've got a free IndieConf ticket to give away. Tell me what your favorite >> session might be and score it http://indieconf.com/sessions/ >> >> It's a great local conference with topics ranging from finance to public >> speaking and more. >> >> cc http://twitter.com/#!/jaredrichardson/status/127378427480260608 >> >> You can reply to me personally or on twitter. >> >> Jared >> http://AgileArtisans.com >> >> _______________________________________________ >> >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members >> >> >> _______________________________________________ >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members >> > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bryan.kearney at gmail.com Mon Oct 24 20:16:20 2011 From: bryan.kearney at gmail.com (Bryan Kearney) Date: Mon, 24 Oct 2011 20:16:20 -0400 Subject: [raleigh.rb] Job Opportunity: Katello Project Message-ID: <4EA5FFD4.6020704@gmail.com> We are looking for a full time Rails engineer to work on the Katello project [1]. This is a full time position, no Contract to Hire available. No firms either.. thanks! If you are interested, please respond off list. Thanks! -- bk [1] http://www.katello.org/ From bryan.kearney at gmail.com Mon Oct 24 20:24:20 2011 From: bryan.kearney at gmail.com (Bryan Kearney) Date: Mon, 24 Oct 2011 20:24:20 -0400 Subject: [raleigh.rb] Job Opportunity: Katello Project In-Reply-To: <4EA5FFD4.6020704@gmail.com> References: <4EA5FFD4.6020704@gmail.com> Message-ID: <4EA601B4.2080900@gmail.com> On 10/24/2011 08:16 PM, Bryan Kearney wrote: > We are looking for a full time Rails engineer to work on the Katello > project [1]. This is a full time position, no Contract to Hire > available. No firms either.. thanks! > > If you are interested, please respond off list. > > Thanks! > > -- bk > > [1] http://www.katello.org/ Sorry.. this is with Red Hat :) -- bk From mshiltonj at gmail.com Tue Oct 25 09:57:28 2011 From: mshiltonj at gmail.com (Steven Hilton) Date: Tue, 25 Oct 2011 09:57:28 -0400 Subject: [raleigh.rb] Time vs ActiveSupport::TimeWithZone In-Reply-To: <94EE4E0C-6547-4788-B323-116C5EB8AD36@iannopollo.com> References: <94EE4E0C-6547-4788-B323-116C5EB8AD36@iannopollo.com> Message-ID: FYI, I changed my config/application.rb to be config.time_zone = "Eastern Time (US & Canada)" config.active_record.default_timezone = :local And I stopped using :db as a parameter to #to_formatted_s() entirely. The unilateral conversion to UTC before stringification in that case is undesired. - Steven On Tue, Oct 18, 2011 at 12:09 PM, Steve Iannopollo wrote: > Wow, it would help if I read the 2nd half of your email. Looks like I repeated what you already knew :-) > > On Oct 18, 2011, at 8:58 AM, Steven Hilton wrote: > >> Hello all, >> >> I'm seeing unexpected timestamp formatting and don't know if it's a >> bug or intentional behavior. Has anyone else seen this? >> >> I have an app where the system is set to Eastern Time Zone. ? The app >> is configured like so: >> >> ? [...] >> ? config.time_zone = "Eastern Time (US & Canada)" >> ? config.active_record.default_timezone = "Eastern Time (US & Canada)" >> ? [...] >> >> Here is what I expect, using Time >> >> ? rails console >> ? Loading development environment (Rails 3.1.0) >> ? irb(main):004:0> t = Time.local(2008, 06, 14) >> ? => 2008-06-14 00:00:00 -0400 >> ? irb(main):005:0> t.to_formatted_s(:db) >> ? => "2008-06-14 00:00:00" >> >> This looks good. However, when I do the same thing with >> ActiveSupport::TimeWithZone, I get this: >> >> ? t = Time.zone.local(2008, 06, 14) >> ? => Sat, 14 Jun 2008 00:00:00 EDT -04:00 >> ? irb(main):009:0> t.class >> ? => ActiveSupport::TimeWithZone >> ? irb(main):010:0> t.to_formatted_s(:db) >> ? => "2008-06-14 04:00:00" ? ? ? ? ? ## It's suddenly 4 am. >> >> >> Even though the time is in Eastern time, and Rails is configured to >> use Eastern, the returned formatted string is ... unexpected. >> >> Why is this? in active_support/time_with_zone.rb, the time is >> unilaterally converted to utc before stringification if the format is >> :db >> >> 166 ? ? def to_s(format = :default) >> 167 ? ? ? if format == :db >> 168 ? ? ? ? utc.to_s(format) ?## <-- RIGHT HERE >> 169 ? ? ? elsif formatter = ::Time::DATE_FORMATS[format] >> 170 ? ? ? ? formatter.respond_to?(:call) ? formatter.call(self).to_s : >> strftime(formatter) >> 171 ? ? ? else >> 172 ? ? ? ? "#{time.strftime("%Y-%m-%d %H:%M:%S")} >> #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s >> format >> 173 ? ? ? end >> 174 ? ? end >> 175 ? ? alias_method :to_formatted_s, :to_s >> >> Other formats work okay: >> >> ? irb(main):002:0> t.to_formatted_s :short >> ? => "14 Jun 00:00" >> >> Does this make any sense? >> >> Thanks! >> >> - Steven >> _______________________________________________ >> raleigh-rb-members mailing list >> raleigh-rb-members at rubyforge.org >> http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > From mriedeman at 6fusion.com Fri Oct 28 14:33:17 2011 From: mriedeman at 6fusion.com (Mark Riedeman) Date: Fri, 28 Oct 2011 18:33:17 +0000 Subject: [raleigh.rb] Is Your Kung-Fu Strong? Message-ID: Can you kick butt in Ruby? Wanna prove it? Hi. I'm Mark Riedeman. I'm the Director of Software Development at http://www.6fusion.com/ a cloud computing/Infrastructure as a Service company here in Raleigh (Centennial Campus to be exact) and I want to hire some awesome Rubyists (is that the term? I don't even know...I'm pretty new to Ruby myself.) Here's why: I started here in April and hired a local team of very talented (and fun) developers. They were working on our .NET-based platform for a while (all .NET experts) and were frustrated with how long it took to build our API with all of the .NET tools. Finally, our lead developer (a pretty inquisitive guy) thought: "I wonder if this would be easier in Ruby?" And after spending a weekend trying it out, it turns out it is in fact easier in Ruby. So, after spending a morning convincing me and the rest of the development team that we would be more productive if we switched to Ruby, we did just that. [Side note about why this is a great place to work: I trust my developers because they're awesome. If you made a compelling case to your company that they should completely change a core technology you're using, would your company switch? If not, wouldn't it be fun to work at a place that put big technology decisions in the hands of the developers that build the technology and probably know best? (See below for correct answer.)] So, here we are: building a cloud computing solution in Ruby and growing fast. So fast that we could really use some developers that can hit the ground running in a Ruby/Rails environment. The kind of developers that will be able to learn whatever other tools and technologies may come along that can help us to be the best technology team building the best software around. Interested in joining or know someone who would be? Let me know. Email me at MRiedeman at 6fusion.com or call me at 919-706-4778. Thanks. Mark Riedeman Director of Software Development 6fusion.com ------------------------ Correct Answer: Yes -------------- next part -------------- An HTML attachment was scrubbed... URL: