'Converts constants from TimestampSpec() to the datastore ones.'

def FromTimestampSpec(self, timestamp):

    if (timestamp.type == timestamp.Type.NEWEST_TIMESTAMP):
        return self.db.NEWEST_TIMESTAMP
    if (timestamp.type == timestamp.Type.ALL_TIMESTAMPS):
        return self.db.ALL_TIMESTAMPS
    if (timestamp.type == timestamp.Type.RANGED_TIME):
        return (int(timestamp.start), int(timestamp.end))
    if (timestamp.type == timestamp.Type.SPECIFIC_TIME):
        return int(timestamp.start)
