git clone https://github.com/equwal/tmpl
Log | Files | Refs
sh/epochsec (172 bytes)
1 # date +%s not portable 2 secs=$((`TZ=GMT0 date \ 3 +"((%Y-1600)*365+(%Y-1600)/4-(%Y-1600)/100+(%Y-1600)/400+1%j-1000-135140)\ 4 *86400+(1%H-100)*3600+(1%M-100)*60+(1%S-100)"`))