Skip to content
Frankie Jarrett
  • Twitter
  • Facebook
  • LinkedIn
  • GitHub
  • Blog
  • About
  • Contact
Night Mode
Text Size

Engineering leader. Love for WordPress.

linux

The problem with relative time calculations in bash date strings

by Frankie Jarrett

Today I was writing a bash script that needed to reference a time in the past relative to the current UTC date. For instance, if today is March 31st, 2015 UTC, what month was it exactly one month ago? Answer: February However, I found it was less than trivial to actually get the correct answer […]

© 2021 Frankie Jarrett
  • Blog
  • About
  • Contact