Skip to content

how to add time to watermark? #3833

Answered by lstrsrt
xomarko asked this question in Q&A
Oct 23, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote
std::time_t time;
std::tm tm;
char tm_str[9];

time = std::time( nullptr );
localtime_s( &tm, &time );
std::strftime( tm_str, sizeof tm_str, "%T", &tm );

After this, tm_str will contain the formatted time string. I assume you know where to use it.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@xomarko
Comment options

@lstrsrt
Comment options

Answer selected by xomarko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants