top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to convert time from one timezone to another in my RoR App?

+2 votes
321 views

How to convert utc time to a time in a particular time zone. As I need to display local time of Timezone(-05:00).

posted Apr 4, 2014 by Tarun Singhal

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

I have an app with users in one timezone with the date / time stored in their location. Now there are more users in more locations and I would like to support them - ideally without changing to historical data.

At the moment the app uses a time offset field to allow two people to see one note expressed in their timezone.

There are two use cases for this one is the free/busy calendar, the other is the meeting invite ICS file.

At the moment I would like to support ICS which are GMT based.

My guess is that:

  • Assign each user to their own timezone
  • I take the diary row ($start_date, $start_time) and convert it to a GMT timestamp
  • Make the ICS file

I am keen to hear of better solutions or ideas.

+1 vote

I have a Rails application with a default time zone of UTC. This works fine for almost everything. Now I have a situation where I would like to present the values in a datetime_select offset by a specific time zone. As far as I know, this helper does not have an option to specify the time zone that is used when persisting this data. When the form is submitted, it only sends the year, month, day, hour, and minute fields. ActiveRecord is responsible for converting these values into the time zone configured for the application. In this case, I want to change the time zone for only these fields so that it is localized to the user (but still store the correct UTC time). How can I make this change?

+1 vote

I would like to convert time zone abbreviation to full time zone in Python.

I'm currently writing dict with this information : http://www.timeanddate.com/library/abbreviations/timezones/

Questions :
* are there the same list somewhere (I didn't found in pytz) ?
* is it possible to append this list in pytz or in standard python date module?

+1 vote

My Ruby on Rails App needs to connect to a ODBC Datasource that has SSL only enabled.

Can somebody give me an example of connecting to a ODBC Source with SSL?

I constantly get SSL required error. I don't see the option of passing SSL Certificates via UnixODBC. May be something I am missing.

+1 vote

I deployed one small app in heroku built on ROR, now I want to send mails. How is it possible can anyone give me a details how to do it.

...