[PR #1409] [MERGED] Add cross-platform support for date command in backup script #1292

Closed
opened 2026-02-04 22:01:52 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/plankanban/planka/pull/1409
Author: @shanickcuello
Created: 10/31/2025
Status: Merged
Merged: 11/18/2025
Merged by: @meltyshev

Base: masterHead: patch-1


📝 Commits (1)

  • 290da2a Add cross-platform support for date command in backup script

📊 Changes

1 file changed (+7 additions, -1 deletions)

View changed files

📝 docker-backup.sh (+7 -1)

📄 Description

Description

Fixes the date: illegal option -- - error that occurs when running backup scripts on macOS.

The date command has different syntax between GNU (Linux) and BSD (macOS). This PR adds cross-platform compatibility by detecting the OS and using the appropriate flag.

Changes

  • Add OS detection for GNU vs BSD date syntax
  • Use --utc flag on Linux, -u flag on macOS
  • Ensures backup datetime generation works on both platforms

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing

Tested on:

  • macOS (BSD date)
  • Linux (GNU date)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/plankanban/planka/pull/1409 **Author:** [@shanickcuello](https://github.com/shanickcuello) **Created:** 10/31/2025 **Status:** ✅ Merged **Merged:** 11/18/2025 **Merged by:** [@meltyshev](https://github.com/meltyshev) **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`290da2a`](https://github.com/plankanban/planka/commit/290da2a4f31a05e3d9f52255dc3f190c04e74588) Add cross-platform support for date command in backup script ### 📊 Changes **1 file changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docker-backup.sh` (+7 -1) </details> ### 📄 Description ## Description Fixes the `date: illegal option -- -` error that occurs when running backup scripts on macOS. The `date` command has different syntax between GNU (Linux) and BSD (macOS). This PR adds cross-platform compatibility by detecting the OS and using the appropriate flag. ## Changes - Add OS detection for GNU vs BSD date syntax - Use `--utc` flag on Linux, `-u` flag on macOS - Ensures backup datetime generation works on both platforms ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update ## Testing Tested on: - [x] macOS (BSD date) - [ ] Linux (GNU date) ## Checklist - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] Any dependent changes have been merged and published --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-04 22:01:52 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#1292