Skip to content

'start_date' date is not in valid ISO-8601 date only format #5

@skatkov

Description

@skatkov

Format sent to tsheet api is not accepted.

TSheets::ExpectationFailedError: TSheets::ExpectationFailedError: 'start_date' date [Sat, 10/07/17 12:00 AM] is not in valid ISO-8601 date only format

code:

timesheet = TsheetsAdapter.new.timesheets
timesheet.each {|record| puts record.inspect }

class TsheetsAdapter
  def initialize
    @tsheets_api = TSheets::API.new do |config|
      config.access_token = TSHEETS_KEY
    end
  end

  def timesheets
    @tsheets_api.timesheets.where(
      start_date: 2.weeks.ago.to_date,
      end_date: DateTime.now.to_date)
  end
end

system:

OSX
ruby -v ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions