fixed the UNIX timestamp calculation using the calendar