Hi Brian,

Oddly, we do not have canned library call for this except for
XrdSysTimer::s2hms() whioch only provides 'hh:mm:ss' given seconds (does
not provide the date). Something along the way of

char buff[10];
XrdSystimer myTime; XrdSysTimer::s2hms(myTime.Seconds, buff, sieof(buff));

I suppose the reason we didn't develop one is because everone
wanted the time reported in a slightly different way, sigh. I suppose we
can come up with a "standard" and provide a library call for that. The
most common one that xrootd uses is "yymmdd hh:mm:ss" which short and
sweet or we can make that the default and allow for different formats.
Then again there is always std::strftime.

Andy


On Fri, 15 Oct 2021, Brian P Bockelman wrote:

> @abh3 - can I get you to provide advice on the best way to do timestamps here? The C code looks fine but I feel like there's some other wrapper around `gettimeofday` in the XRootD internal libraries already...
>
> --
> You are receiving this because you were mentioned.
> Reply to this email directly or view it on GitHub:
> https://github.com/xrootd/xrootd/pull/1529#issuecomment-944269417


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/pull/1529#issuecomment-944730807", "url": "https://github.com/xrootd/xrootd/pull/1529#issuecomment-944730807", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1