[Bug] fixed setAttribute methods' date handling

it was converting date time object to proper format, then just ignoring what it just did
Merge pull request #610 from kapv89/patch-2

[Bug] fixed setAttribute methods' date handling