Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a shapefile with a start and end time field, properly formatted. However my dates range from 1864-1995. When I try to use the shape file with the QGIS time manager plugin I keep getting this message:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:/PROGRA~2/Quantum GIS Wroclaw/apps/qgis/./python/plugins\TimeManager
   \timemanagerguicontrol.py", line 342, in updateTimeExtents
    self.dock.horizontalTimeSlider.setMinimum(mktime(timeExtents[0].timetuple()))
ValueError: year out of range

I found that one limitation of time manager is: The range of manageable years is limited due to limitations in time.mktime. The exact range is platform dependent.

Is there a way to find out what the exact range is or change it?

When I tested a sample of my shapefile for 1977 and 1984 they worked fine.

Thanks!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

On my Win7 x64, the minimum datetime is 1970-01-01 01:00:00 (mktime returns 0).

A quick and dirty solution is to "shift" the dates into the supported range (over year 1970) by adding a big enough number to the year value.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.