Transitime / core

Transitime 0.1 (beta) is an open source project created and managed by Swiftly, Inc. to help transit agencies generate more accurate and reliable real-time arrival information for passengers. This version of the code is an early beta release and should not be used for production implementations. Please reach out to Swiftly at contact@goswift.ly for the most up-to-date software.
https://goswift.ly/transitime
GNU General Public License v3.0
61 stars 76 forks source link

gtfsFileProcessor looks for timeZone from first Agency in database which fails on first run. #7

Closed scrudden closed 9 years ago

scrudden commented 9 years ago

The constructors

public ServiceUtils(DbConfig dbConfig) public Time(DbConfig dbConfig)

call

this.calendar = new GregorianCalendar(dbConfig.getFirstAgency().getTimeZone());

Both throw exceptions if no agency in database.

Could catch exception and use GregorianCalendar() for first run?

@skibu Will I implement this fix in a branch?

skibu commented 9 years ago

With the latest code I tried creating a new agency database and processed the GTFS data using gtfsFileProcessor. It seemed to work just fine without an exception. I did make changes in the last few days to deal with this problem and other timezone issues. Have you tried it with the latest code?

scrudden commented 9 years ago

I will try out in the next few days.

scrudden commented 9 years ago

I have since tried this and it is no longer an issue.