AmendHub

Download:

jcs

/

subtext

/

amendments

/

538

util: Add Unix/Mac timestamp conversion macros


jcs made amendment 538 11 months ago
--- util.h Mon Mar 27 21:33:13 2023 +++ util.h Tue Nov 14 16:44:25 2023 @@ -50,6 +50,10 @@ #define TICKS_PER_SEC 60L +/* 24107 days */ +#define UNIX_TO_MAC_TIME(uts) ((unsigned long)(uts) + 2082844800) +#define MAC_TO_UNIX_TIME(mts) ((unsigned long)(mts) - 2082844800) + #define MAX_TEXTEDIT_SIZE 32767L #ifndef bool