# Restful\_authentication rspec failures "Mysql::Error: Incorrect datetime value:"

**URL:** <https://www.ruby-forum.com/t/restful-authentication-rspec-failures-mysql-incorrect-datetime-value/148449>\
**Category:** Rails\
**Created:** [September 12, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/restful-authentication-rspec-failures-mysql-incorrect-datetime-value/148449 "2008-09-12T23:37:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [September 12, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/restful-authentication-rspec-failures-mysql-incorrect-datetime-value/148449/1 "2008-09-12T23:37:40Z")

</div>

I am getting 193 failures that all have “Mysql::Error: Incorrect  
datetime value:”  
how do i fix this??? i am new to rspec and restful\_auth, so if i am  
doing something wrong, let me know!!!

windows xp  
rails 2.1.1

rails testproject  
cd testproject

# create my databases and edit database.yml

git init  
git submodule add git://github.com/dchelimsky/rspec.git vendor/plugins/  
rspec  
git submodule add git://github.com/dchelimsky/rspec-rails.git vendor/  
plugins/rspec-rails  
git submodule add  
git://github.com/technoweenie/restful-authentication.git  
vendor/plugins/restful\_authentication  
git submodule init  
git submodule update  
ruby script/generate rspec  
ruby script/generate rspec\_scaffold blog title:string content:text  
rake db:migrate  
rake spec # 37 examples, 0 failures  
git add .  
git commit -a -m “blog with passing rspec tests”  
ruby ./script/generate authenticated User Sessions  
rake db:migrate # 288 examples, 193 failures

1. 

ActiveRecord::StatementInvalid in ‘SessionsController on signout  
redirects me to the home page’  
Mysql::Error: Incorrect datetime value: ‘2008-09-13 21:22:52 UTC’ for  
column ‘remember\_token\_expires\_at’ at row 1: INSERT INTO `users`  
(`salt`, `updated_at`, `crypted_password`,  
`remember_token_expires_at`, `id`, `remember_token`, `login`,  
`created_at`, `email`) VALUES  
(‘356a192b7913b04c54574d18c28d46e6395428ab’, ‘2008-09-12 21:22:52’,  
‘6165929d552bca405be2db0bb538613c8bad7b08’, ‘2008-09-13 21:22:52 UTC’,  
1, ‘77de68daecd823babbb58edb1c8e14d7106e83bb’, ‘quentin’, ‘2008-09-07  
21:22:51’, ‘removed\_email\_address@domain.invalid’)

---

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [September 13, 2008, 7:33pm UTC](https://www.ruby-forum.com/t/restful-authentication-rspec-failures-mysql-incorrect-datetime-value/148449/2 "2008-09-13T19:33:09Z")

</div>

it turns out mysql was installed in a safe mode or something  
i found this

[http://kb.helpdeskpilot.com/knowledgebase.php?act=art&article\_id=124](http://kb.helpdeskpilot.com/knowledgebase.php?act=art&article_id=124)  
Now, open the my.ini file located at c:program files/MySQL/MySQL  
Server X.x/my.ini.  
Add a # at the begining of the line: sql-  
mode=“STRICT\_TRANS\_TABLES,NO\_AUTO\_CREATE\_USER,NO\_ENGINE\_SUBSTITUTION”  
Type sql\_mode=‘’ on the next line and save the file.  
restart mysql

fixed it
