# Sqlite error with timezones

**URL:** <https://www.ruby-forum.com/t/sqlite-error-with-timezones/175762>\
**Category:** Rails\
**Created:** [September 19, 2009, 2:58am UTC](https://www.ruby-forum.com/t/sqlite-error-with-timezones/175762 "2009-09-19T02:58:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [September 19, 2009, 2:58am UTC](https://www.ruby-forum.com/t/sqlite-error-with-timezones/175762/1 "2009-09-19T02:58:29Z")

</div>

Any ideas where I should look, have this error while deploying to  
Heroku,

ActiveRecord::StatementInvalid (PGError: ERROR: function  
strftime(unknown, timestamp without time zone, unknown) does not exist  
LINE 1: SELECT strftime(’%Y’, created\_at) as year, strftime(’…

I’ve checked the SqlLite documentation but can’t find anything regarding  
this, the timezone is set in the Rails app, weird error

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [September 19, 2009, 5:28am UTC](https://www.ruby-forum.com/t/sqlite-error-with-timezones/175762/2 "2009-09-19T05:28:34Z")

</div>

John G. wrote:

> Any ideas where I should look, have this error while deploying to  
> Heroku,
> 
> ActiveRecord::StatementInvalid (PGError: ERROR: function  
> strftime(unknown, timestamp without time zone, unknown) does not exist  
> LINE 1: SELECT strftime(’%Y’, created\_at) as year, strftime(’…
> 
> I’ve checked the SqlLite documentation but can’t find anything regarding  
> this, the timezone is set in the Rails app, weird error

run:  
rake time:zones:local  
to find your current time zone setting.  
check your config/environment.rb, find the following statement:  
config.time\_zone = ‘UTC’  
change it to whatever you want.

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [September 19, 2009, 4:52pm UTC](https://www.ruby-forum.com/t/sqlite-error-with-timezones/175762/3 "2009-09-19T16:52:48Z")

</div>

PGError comes from postgres adapter, not sqlite, you might want to  
look at [PostgreSQL: Documentation](http://www.postgresql.org/docs/manuals/) instead of the sqlite  
docs.

On Sep 18, 8:58 pm, John G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [September 19, 2009, 5:40pm UTC](https://www.ruby-forum.com/t/sqlite-error-with-timezones/175762/4 "2009-09-19T17:40:40Z")

</div>

yep, i was trying to push an app to Heroku, little did i know it takes  
mysql or sqlite db’s and dumps them into PostGreSQL format.

i’ll eventually crack the importing, gonna try a smaller app before the  
big one.

thanks for the help.
