Posts

Showing posts with the label rails

Modifying the timezone in Ruby or with ActiveSupport

Sometimes you may need to query an SQL record in ruby and convert the UTC time into a local timezone. This is usually done in a framework like Ruby on Rails. Many web frameworks use the Active Support gem. From their enhanced tooling, they may set the timezone on the thread by calling: Time.zone = "Requests Time Zone". The Time class in ruby (w/ ActiveSupport) can then access this by calling the getter method: Time.zone Here are some examples of how this plays out in action. See the TimeZone documentation if you need more info. Hope this may be helpful and please comment if you have any questions or additional advice!

Rails Unfit for Microservices?

This is a relatively informal blog post. Looking more for feedback and response to get a conversation started. The prerequisite to this thread is that you have a fairly good understanding of Microservices. If not at least read the following link: http://martinfowler.com/articles/microservices.html