Class: DateTime

Inherits:
Object show all
Defined in:
lib/wdd-ruby-ext/time.rb

Constant Summary collapse

LOG_TIME_FORMAT =
"%a %Y-%m-%d %H:%M:%S"
DB_TIME_FORMAT =
"%Y-%m-%d %H:%M:%S"

Instance Method Summary collapse

Instance Method Details

#dbfObject

Format date and time for SQL



19
20
21
# File 'lib/wdd-ruby-ext/time.rb', line 19

def dbf
  strftime(DB_TIME_FORMAT)
end

#ltfObject

Format date and time for log timestamp



14
15
16
# File 'lib/wdd-ruby-ext/time.rb', line 14

def ltf
  strftime(LOG_TIME_FORMAT)
end