~smlavine/omnavi#2: 
+%s date specifier is not valid in BusyBox date(1)

~yerinalexey reported this issue. It is similar to #1.

%s is a format specifier for "seconds since the Epoch (1970-01-01 00:00 UTC)". It is implemented by GNU date but not specified by POSIX.

In the discussion on IRC, ~ecs mentioned this lovely gem as a potential alternative:

$(($(date -u +"((%Y-1600)*365+(%Y-1601)/4-(%Y-1601)/100+(%Y-1601)/400+1%j-1000-135140)*86400+(1%H-100)*3600+(1%M-100)*60+(1%S-100)")))

It is an improved snippet from this guide.

I do not yet know how should be addressed, but probably in the same way as #1.

Status
REPORTED
Submitter
~smlavine
Assigned to
No-one
Submitted
3 years ago
Updated
3 years ago
Labels
GNU

~yerinalexey 3 years ago

No, +%s is valid in busybox

~smlavine 3 years ago

Oh, sorry. Wires crossed between the two issues.

Register here or Log in to comment, or comment via email.