Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unix-Time -> Human Time errechnen per Skript

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe eine Zahl, z.Bsp. 1141408532

Wie muss ein Shell-Skript aussehen, um aus der Unix-Time eine "normal" Leserliche Datums- und Zeitangabe zu errechnen?

Ich stelle mir das so vor dass ich die Zahl als Parameter an das Skript übergebe, und es mir als Antwort dann 03.03.2006 17:55:32 ausgibt....

Ich bin allerdings nicht so der Shell-Gott....

  • Autor

Danke für den Tipp :)

Bei meiner Distribution www.openwrt.org funktioniert dass jedoch nicht so ganz:

Irgendwie sind das 2 Stellen zuviel:

root@OpenWrt:/# date

Fri Mar 3 18:49:11 UTC 2006

root@OpenWrt:/# date -d "1970-01-01 1141408532 sec"

date: invalid date `1970-01-01 1141408532 sec'

root@OpenWrt:/# date --help

BusyBox v1.00 (2005.11.23-21:46+0000) multi-call binary

Usage: date [OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]

Displays the current time in the given FORMAT, or sets the system date.

Options:

-R Outputs RFC-822 compliant date string

-d STRING Displays time described by STRING, not `now'

-I[TIMESPEC] Outputs an ISO-8601 compliant date/time string.

TIMESPEC=`date' (or missing) for date only,

`hours', `minutes', or `seconds' for date and,

time to the indicated precision.

-s Sets time described by STRING

-r FILE Displays the last modification time of FILE

-u Prints or sets Coordinated Universal Time

root@OpenWrt:/# date -d 1141408532

date: invalid date `1141408532'

root@OpenWrt:/# date -d 11414085

Tue Dec 12 17:25:00 UTC 2006

root@OpenWrt:/# date -d 114140850

date: invalid date `114140850'

root@OpenWrt:/# date -d 11414000

Tue Dec 12 16:00:00 UTC 2006

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.