Fix timestamp api