File: getdate.sh

package info (click to toggle)
prrte 3.0.13-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 9,128 kB
  • sloc: ansic: 80,431; sh: 4,289; perl: 3,195; makefile: 1,829; lex: 352; python: 239
file content (11 lines) | stat: -rwxr-xr-x 527 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
#
# Copyright (c) 2017      Research Organization for Information Science
#                         and Technology (RIST). All rights reserved.
# Copyright (c) 2020      Cisco Systems, Inc.  All rights reserved.

# Provide a way to override build date for reproducible build results
# See https://reproducible-builds.org/ for why this is good.

SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
date -u -d "@$SOURCE_DATE_EPOCH" "$@" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "$@" 2>/dev/null || date -u "$@"