date(1) on Solnix vs Linux and the BSDs
On Solnix, date is the illumos date at /usr/bin/date. It has only -a, -r, -R, -u, a +format operand and a set-time operand. Linux's -d, -s, -I and -f, FreeBSD's -v and -j, and the BSD -z do not exist, and the set-time string puts the year last, not first as on the BSDs.
The manual pages
- Solnix: date(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: date(1) coreutils-full-9.11
- FreeBSD: date(1) 15.1-RELEASE
- OpenBSD: date(1) 8.0
- NetBSD: date(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
date
What Solnix runs
A default Solnix system runs the illumos /usr/bin/date. /usr/xpg4/bin/date is also shipped with the same synopsis. The documented difference is the %C conversion: /usr/bin/date gives the locale's date and time representation, while /usr/xpg4/bin/date gives the century as [00-99]. Both are marked CSI enabled.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD, OpenBSD, NetBSD | set-time operand order | Solnix sets the time with [mmdd]HHMM or mmddHHMM[cc]yy[.SS], with the year after the minutes. The three BSDs use [[[[[cc]yy]mm]dd]HH]MM[.SS], with the year first and the minutes required. Do not reuse a longer date string between them. Source: Solnix date(1) SYNOPSIS and OPERANDS; FreeBSD date(1) SYNOPSIS; OpenBSD date(1) DESCRIPTION, STANDARDS; NetBSD date(1) DESCRIPTION |
| Linux | setting and parsing free-form dates | Solnix has no -d and no -s. It sets the clock only through the positional operand and cannot parse a free-form date string. Linux -d STRING displays an arbitrary described time and -s STRING sets the time from a string.Source: Solnix date(1) SYNOPSIS, OPTIONS; Linux date(1) -d, --date; -s, --set |
| all four | -f meaning | Solnix date has no -f. On Linux, -f reads a file of date strings, one per line. On FreeBSD, OpenBSD and NetBSD, -f gives a strptime(3) input format for parsing the new date. The same flag means different things on Linux and the BSDs.Source: Solnix date(1) SYNOPSIS; Linux date(1) -f, --file; FreeBSD date(1) -f; OpenBSD date(1) -f; NetBSD date(1) -f |
| FreeBSD, OpenBSD, NetBSD | -j and -z missing | Solnix has no -j (parse without setting) and no -z (output time zone). Set TZ in the environment instead. Solnix uses TZ unless -u is given. NetBSD -z with an empty string reverts to the default zone, ignoring TZ.Source: Solnix date(1) ENVIRONMENT VARIABLES (TZ); FreeBSD date(1) -j, -z; OpenBSD date(1) -j, -z; NetBSD date(1) -z |
| all four | -a meaning | Solnix -a takes an argument [-]sss.fff and slowly adjusts the clock by that many seconds. OpenBSD and NetBSD -a takes no argument and uses adjtime(2) to skew toward the time given as the operand. Linux and FreeBSD list no -a.Source: Solnix date(1) -a; OpenBSD date(1) -a; NetBSD date(1) -a; Linux date(1) OPTIONS; FreeBSD date(1) OPTIONS |
| Linux, OpenBSD, NetBSD | -r meaning | Solnix -r accepts either epoch seconds or a filename (its modification time). FreeBSD does the same. Linux -r accepts only a file. OpenBSD and NetBSD -r accept only seconds since the Epoch.Source: Solnix date(1) -r seconds, -r filename; FreeBSD date(1) -r; Linux date(1) -r, --reference; OpenBSD date(1) -r; NetBSD date(1) -r |
| all four | -R output format | Solnix -R uses %a, %d %h %Y %H:%M:%S %z, described as similar to RFC 822. Linux and NetBSD describe -R as RFC 5322, and FreeBSD as RFC 2822. OpenBSD's date has no -R.Source: Solnix date(1) -R; Linux date(1) -R, --rfc-email; FreeBSD date(1) -R; NetBSD date(1) -R; OpenBSD date(1) SYNOPSIS |
| Linux, FreeBSD | ISO 8601 output | Solnix has no -I. Linux and FreeBSD -I[FMT] print ISO 8601 output. On Solnix, build it with a +format string.Source: Solnix date(1) SYNOPSIS; Linux date(1) -I, --iso-8601; FreeBSD date(1) -I |
| FreeBSD | date arithmetic with -v | FreeBSD -v adjusts the displayed date by units (y, m, w, d, H, M, S). Solnix, Linux, OpenBSD and NetBSD have no -v, so date arithmetic needs another tool or approach.Source: FreeBSD date(1) -v; Solnix date(1) SYNOPSIS |
| Linux | %C meaning | With /usr/bin/date, Solnix %C is the locale's date and time representation. Linux %C is the century. /usr/xpg4/bin/date gives the century like Linux does.Source: Solnix date(1) OPERANDS +format; Linux date(1) %C |
| FreeBSD, OpenBSD, NetBSD | -n and -U | Solnix has no -n or -U. FreeBSD -n is obsolete and ignored. NetBSD -n stops date setting the time on other machines when timed(8) is running. NetBSD -U resets the zone changed by -u or -z.Source: FreeBSD date(1) -n; NetBSD date(1) -n, -U; Solnix date(1) SYNOPSIS |
Standards
- POSIX: date is a POSIX.1-2024 utility.
- Solnix: ATTRIBUTES: CSI is enabled for both
/usr/bin/dateand/usr/xpg4/bin/date. - OpenBSD: The date utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. Flags
-a,-f,-j,-r,-zand several conversions are extensions. The required BSD date format differs from the X/Open System Interfaces option. - NetBSD: The date utility is expected to be compatible with IEEE Std 1003.2 (“POSIX.2”). True compatibility requires running date with POSIXLY_CORRECT set, to parse the archaic time string format POSIX demands.
Writing portable scripts
- Use only
-u, a +format operand and, if needed,-rseconds in portable scripts. Avoid-d,-f,-j,-z,-v,-aand-I, which differ or are missing. - Do not rely on %N, which the Solnix and Linux pages document. The BSD pages defer to strftime(3) and do not list it. Avoid setting the clock with a bare digit string in cross-system scripts, since the year position differs.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.