I am having an issue trying to deal with timezones in the JQuery date/time picker, with Rails. The datepicker, correctly shows the local timezone. The problem arises, when I save the selected date into my database, rails is saving it as a UTC time, even though the time is in the timezone of the client. When I attempt to convert the time to utc (Time.zone.parse(params[:time]).utc ), it gives me the same value as params[:time], which is the local time.
I do not want to change the Setting of config.time_zone in the environment.rb file, as I do not want the time to be saved in the local timezone of the server either.
What I want to do, is receive the local time, and convert it to utc, so I can schedule a cron job on a server whose time is set to utc. I would like to save the time in the database, as the users' local timezone... but I am unable to find a way to get the client's timezone!
Do I have any other options.. besides adding the timezone as an option on the datepicker?