cs_convert_time(8)

πŸ“¦ version 3.1.3, in opensuse-leap 16.0

✨ cs_convert_time(8) ✨

okay so bestie, we're in the ClusterTools2 house today and the star of the show is cs_convert_time β€” she's an 8th-section (admin/privileged) command and she does exactly one thing but she does it iconically. πŸŽ€


🌸 NAME 🌸

cs_convert_time β€” literally just converts a date/time string between Unix Epoch and wall clock, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

cs_convert_time <date/time string>

⭐ DESCRIPTION ⭐

So here's the vibe: cs_convert_time converts date/time strings between Unix Epoch and wall clock πŸ”₯

And the way it works? The script is lowkey a genius β€” it tries to figure out the desired direction from the format of the given argument 🧚 She reads your string, she clocks the format, and she knows which way you're going. main character energy fr fr πŸ‘‘


πŸŽ€ EXIT STATUS πŸŽ€

  • 0 β€” successful program execution. we slayed. ate and left no crumbs πŸ’–
  • >0 β€” usage, syntax or execution errors [insert sad trombone] 😭

🌈 EXAMPLES 🌈

  • convert a given Unix Epoch time into wall clock date/time πŸ•°οΈ
# cs_convert_time 484422540
  • convert a given wall clock date/time into Unix Epoch time ⏳
# cs_convert_time "Wed May 08 19:49:00 CEST 1985"
  • convert current wall clock date/time into Unix Epoch time ✨ (yes bestie, live and current, obsessΓ©)
# cs_convert_time $(LANG=C date)

πŸ’œ FILES πŸ’œ

  • /usr/sbin/cs_convert_time β€” the program itself. that's her. that's the girl 🫢

πŸ’€ BUGS πŸ’€

wall clock time needs to be in format LANG=C. that's the rule, ngl. if you don't give her LANG=C she's gonna be confused and honestly same πŸ™ˆ

Feedback is welcome, please mail to feedback@suse.com β€” she reads her inbox, she's not ghosting you πŸ’Œ


πŸ”₯ SEE ALSO πŸ”₯

date(1), time(7), ClusterTools2(7), cs_dmesg(8)

and the sacred text itself, iykyk:

http://stackoverflow.com/questions/95492/how-do-i-convert-a-date-time-to-epoch-time-aka-unix-time-seconds-since-1970


(c) 2015-2019 I.Manyugin, L.Pinne; Germany.

cs_convert_time comes with ABSOLUTELY NO WARRANTY β€” like, none, zero, nada. For details see the GNU General Public License at http://www.gnu.org/licenses/gpl.html πŸ“œ


🌸 okay that's the whole page, bestie! shoutout to ClusterTools2, dated 10 Jun 2020 β€” she's been serving epoch-to-wall-clock realness since day one and she's still that girl πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from