That is a nice way to do it without needing to install modules. However, it's often better to use a module anyway, because there are many subtle traps with time processing. For example, not all days are 86,400 seconds long, such as those Sundays when we switch between standard and daylight savings time.