Home GnuPG
Diffusion GnuPG 1ddf5b846fc0

common: New function rfctimestamp.
1ddf5b846fc0Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

common: New function rfctimestamp.

* common/gettime.c (rfctimestamp): New.

It is surprisingly hard to create an RFC-2822 compliant Date value.
The problem is that strftime uses the current locale but the RFC
requires that the English names are used. This code is pretty simply
and avoid the extra problem of figuring out the correct timezone;
instead UTC is used. For the planned use case this is anyway better.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jun 28 2016, 3:45 PM
Parents
rG781e614e3b45: common: Add missing header file for clarity.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG1ddf5b846fc0: common: New function rfctimestamp. (authored by Werner Koch <wk@gnupg.org>).Jun 28 2016, 3:53 PM