how to get time information from a unix time:
var date = new Date(unixTime)
// You can get seconds/minutes/hours/years from Date objects
// And make them account for timezones
// This constructor takes a unix time
// Also Date.now() returns the current unix time
var seconds = date.getSeconds() // seconds in a minute (0-59)
var minutes = date.getMinutes() // minutes in an hour (0-59)
For timers you can make it store when the timer should end. Then get the time between now and then. It’d probably be like the number of milliseconds. Then convert that to seconds, minutes, hours, e.t.c and display that nicely.
For alarms, I guess you can get the amount of time that has passed since the beginning of the day using the getHours(), getMinutes(), and getSeconds() functions, and convert that into a single number using basic math. Store that for the alarm time. Then every once in a while, get the current time using the method I explained, and check if it passed the alarm time. If it did, the alarm goes off, and it disables that alarm until the next day, which would be told as the time since the start of the day being less than an older value.