FUNCTION::TZ_CTIME(3stap)
π FUNCTION::TZ_CTIME β bestie's guide to timezone-flavoured timestamps π
okay so this one lives in the Time utility functions part of the SystemTap Tapset Reference, section 3stap, and it's genuinely one of my faves. it's called tz_ctime and no cap, it's giving "what time is it where I am" energy πβ¨
πΈ NAME πΈ
function::tz_ctime β take seconds since epoch and turn them into a human readable date/time string, but make it local time zone aware π
β¨ SYNOPSIS β¨
tz_ctime(epochsecs:)
π ARGUMENTS π
epochsecsβ the number of seconds since epoch, literally the exact kind of valuegettimeofday_shands you back π«Ά
π¦ DESCRIPTION π¦
so you feed it an argument of seconds since the epoch, the same flavour gettimeofday_s returns. it gives you back a string in the same form as ctime β but with a glow-up: it offsets the epoch time for your local time zone and then appends the name of that local time zone right on the end. iconic behaviour, honestly π
heads up tho bestie β the string length may vary. don't be out here assuming it's always the same size, because it is not π
also, real talk: the time zone information is passed by staprun at script startup only. that's it. that's the whole window. so if you were expecting it to magically update later, nope, that's not the vibe π
π SEE ALSO π
π sign-off π
that's the whole page, bestie, we ate and left no crumbs π this was the SystemTap Tapset Reference, version dated September 2026 β FUNCTION::TZ_CTIME(3stap), mwah π go forth and format your timestamps β¨π§
π¦ where this page comes from
- centos-stream 10: systemtap-client 5.6-3.el10 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- centos-stream 9: systemtap-client 5.6-3.el9 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 43: systemtap-client 5.6-1.fc43 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 44: systemtap-client 5.6-1.fc44 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms