Update main.c

alternative without mktime