ets-berkeley-edu/calcentral — pull request #3155 by raydavis (2014-11-26 17:23:10+00:00)
Title: CLC-3862 Support multiple Tele-BEARS terms in My Academics

https://jira.ets.berkeley.edu/jira/browse/CLC-3862

We currently only ask BearFacts-API for Tele-BEARS appointments in the "Future Term". However, from early June until the following January, BearFacts systems consider Fall the "Current Term". During the summer, this means that legitimate Fall appointments will be lost.

This change will add a check for the "Current Term" when that term is actually in the future.

This also protects our code against the problem exposed by Travis-CI failures at: https://github.com/ets-berkeley-edu/calcentral/pull/3152

We currently receive Tele-BEARS appointment time strings in an unusual format without any timezone specified, and we've been instructed to interpret them as the usual Pacific time for that date. However, Rails timezone support does not include a general-purpose strptime method, and so CalCentral has instead been relying on standard Ruby strptime().to_datetime, which uses the operating system's default timezone. When some Travis hosts began using UTC, some of our tests broke.

I've added the missing "strptime" method to (I hope!) work around this.