test: fix time-related tests on 32-bit environment

Redmine: fixes #2580

This patch is written by Toshihisa Tashiro. Thanks!!!