Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • date -d (from the question) is also non-portable... (On FreeBSD it will try to mess with DST settings, on Solaris it will give an error...) The question does not specify an OS though... Commented Jan 13, 2017 at 8:14
  • @GertvandenBerg yes, this is addressed in the last paragraph of this answer. Commented Jan 13, 2017 at 15:56
  • I mean that the asker's sample also has portability issues... (They should probably have tagged an OS...) Commented Jan 14, 2017 at 16:06