Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Switch default values to UTC, and add sub-second values #80

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Switch default values to UTC, and add sub-second values #80

wants to merge 3 commits into from

Conversation

tpitale
Copy link
Member

@tpitale tpitale commented Mar 11, 2015

First pass, we probably need more specs in different timezones, and more structure between Time and DateTime.

Please let me know what you think @dbussink. This is passing when I run bundle exec rake spec from within do_postgres.

@tpitale
Copy link
Member Author

tpitale commented Mar 11, 2015

This relates to both #78 and #79.

@@ -210,18 +210,20 @@ VALUE data_objects_parse_time(const char *date) {
return Qnil;
}

// TODO: support the timezone being returned from
return rb_funcall(rb_cTime, rb_intern("local"), 7, INT2NUM(year), INT2NUM(month), INT2NUM(day), INT2NUM(hour), INT2NUM(min), INT2NUM(sec), INT2NUM(usec));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this local call doesn't support setting the timezone AFAIK.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we'd need to handle the cases different here then. Use local when there's no UTC offset present, but build an object with the specific UTC offset otherwise.

@tpitale
Copy link
Member Author

tpitale commented Mar 13, 2015

Hrm. TravisCI appears to be randomly killing the build after that last push.

@dbussink
Copy link
Contributor

@tpitale What do you mean with killing the build?

@tpitale
Copy link
Member Author

tpitale commented Mar 13, 2015

The builds stopped at random places, and the last thing in the log is: 'The build has been terminated'. https://travis-ci.org/datamapper/do/jobs/54308706#L573

@dbussink
Copy link
Contributor

@tpitale I suspect something might be broken then that causes it to hang indefinitely and then Travis aborts it. I suspect it's a problem with the changes, not with Travis. Might have some time tomorrow to run this and see if there's anything standing out.

@tpitale
Copy link
Member Author

tpitale commented Mar 13, 2015

Yeah, the specs stalled for me locally after that change. I'll dig in when I get home tonight. I had to reinstall my MySQL.

@tpitale
Copy link
Member Author

tpitale commented Mar 14, 2015

Okay, I reverted that change from yesterday. Now I'm trying to figure out how to get mysql to work in UTC. It's just insanity.

@tpitale
Copy link
Member Author

tpitale commented Mar 14, 2015

I don't think it's possible for mysql to share specs with postgresql and use a time zone other than local system time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants