diff --git a/app/assets/javascripts/panel.js b/app/assets/javascripts/panel.js index 2f483f0..2f25773 100644 --- a/app/assets/javascripts/panel.js +++ b/app/assets/javascripts/panel.js @@ -22,6 +22,7 @@ Ext.define('Ext.ux.form.field.DateTime', { dateSubmitFormat: 'Y-m-d', timeFormat: 'H:i:s', timeSubmitFormat: 'H:i:s', + submitFormat: 'c', dateConfig:{}, timeConfig:{}, @@ -184,8 +185,10 @@ Ext.define('Ext.ux.form.field.DateTime', { var me = this ,format = me.getFormat() ,value = me.getValue(); - - return value ? Ext.Date.format(value, format) : null; + console.log(value); + console.log(format); + console.log("formatted: " + Ext.Date.format(value, this.submitFormat)); + return value ? Ext.Date.format(value, this.submitFormat) : null; }, setValue: function(value){ diff --git a/db/migrate/20140504154355_add_timezones_to_logs.rb b/db/migrate/20140504154355_add_timezones_to_logs.rb new file mode 100644 index 0000000..8f219a6 --- /dev/null +++ b/db/migrate/20140504154355_add_timezones_to_logs.rb @@ -0,0 +1,15 @@ +class AddTimezonesToLogs < ActiveRecord::Migration + def up + change_table :logs do |t| + t.change :start_date, :timestamptz + t.change :end_date, :timestamptz + end + end + + def down + change_table :logs do |t| + t.change :start_date, :timestamp + t.change :end_date, :timestamp + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 217d6a2..afb081d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20131019170248) do +ActiveRecord::Schema.define(:version => 20140504154355) do create_table "bike_actions", :force => true do |t| t.string "action", :limit => 128, :null => false