get current time for a variable instead of being set to 0