update timestamp.py to fix some bug