Skip to content

Instantly share code, notes, and snippets.

@ross-nordstrom
Last active August 29, 2015 14:07
Show Gist options
  • Save ross-nordstrom/a8111d8e064f4c75e1a9 to your computer and use it in GitHub Desktop.
Save ross-nordstrom/a8111d8e064f4c75e1a9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'json'
time = Time.new
data = {
:general_state => 1, # TODO: Fancy logic to set based on value
:year => time.year % 100,
:month => time.month,
:day => time.day,
:hour => time.hour,
:minute => time.min
}
puts data.to_json.gsub(/"/, "'")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment