Behavior of t.register when r.timestamp was used
|Reported by:||wenzeslaus||Owned by:|
|Keywords:||t.create, t.register, r.timestamp, G_write_raster_timestamp||Cc:|
I'm trying to figure out what is the right behavior and usage of t.register in case when the raster map already has a "simple GRASS" time stamp (managed e.g. by
-t produces time series which has time stamps from
G_write_raster_timestamp(). The time stamps are relative.
Later, when you create a temporal dataset using t.create and set absolute time and use
t.register to register the map or maps providing the start time and increment, you get an error saying that the time and date provided as start cannot be converted to integer.
Here is the code to reproduce it:
And this is the error:
ERROR: invalid literal for int() with base 10: '2015-01-01 00:01:00'
It comes from:
if ttype == "absolute": ... else: start_time = int(start) # here
if not is_in_db: map.read_timestamp_from_grass()
The condition doesn't depend on the input parameters to
t.register and the behavior seems to be unexpected from the user point of view (plus of course there should be no low-level error like this one).