aboutsummaryrefslogtreecommitdiffstats
path: root/common/gettime.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common: New functions timegm_u64, isotime2epoch_u64.Werner Koch2023-10-261-1/+7
| | | | | | | | | | | | | | | | | | | * common/mischelp.c (timegm): Move to ... * common/gettime.c (timegm): here. On Windows use timegm_u32. (timegm_u32): New. (isotime2epoch): Factor code out to ... (isotime_make_tm): new helper. (isotime2epoch_u64): New. (_win32_timegm): Remove duplicated code. (parse_timestamp): Use of timegm. (scan_isodatestr): Fallback to isotime2epoch_u64. -- This mainly helps on 32 bit Windows. For Unix we assume everyone is using 64 bit or shall wait until the libc hackers finally provide a time64_t. GnuPG-bug-id: 6736
* common: New function scan_secondsstr.Werner Koch2023-10-141-0/+1
| | | | | | | * common/gettime.c (scan_secondsstr): New. * common/t-gettime.c (test_scan_secondsstr): (main): Call it.
* sm: Fix use of value NONE in gnupg_isotime_t type.NIIBE Yutaka2022-02-181-0/+5
| | | | | | | | | | | | | | * common/gettime.h (GNUPG_ISOTIME_NONE): New. * sm/call-dirmngr.c (gpgsm_dirmngr_isvalid): Use it. * sm/certlist.c (gpgsm_add_to_certlist): Likewise. * sm/import.c (check_and_store): Likewise. * sm/keylist.c (list_cert_colon, list_cert_raw): Likewise. (list_cert_std): Likewise. * sm/sign.c (gpgsm_sign): Likewise. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* common: New function rfctimestamp.Werner Koch2016-06-281-0/+1
| | | | | | | | | | | | | * 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 <[email protected]>
* common: Change license of some modules to LGPLv3+/GPLv2+.Werner Koch2015-12-141-5/+15
| | | | | | | | | | | | | | | | * common/status.c: Change from GPLv3 to LGPLv3+/GPLv2+. * common/status.h: Ditto. * common/yesno.c: Ditto. * common/common-defs.h: Ditto. * common/gettime.h: Ditto. * common/keyserver.h: Ditto. -- This is shared code and trivial enough to allow use under GPLv2+ so to allow use by GPLv2only software. Some of the headers are simply adjusted to the license of their implementation. Signed-off-by: Werner Koch <[email protected]>
* common: Add new function gnupg_gmtime.Werner Koch2015-04-101-0/+1
| | | | | | | | | | | | | * common/gettime.c (gnupg_gmtime): New. (gnupg_get_isotime): Use it. Also take care of an gmtime_t returning an error. -- The fix in gnupg_get_isotime is only to cover up a theoretical broken time (e.g. a value of (time_t)(-2) which is not mapped beyond 2038 on 32 bit systems). Signed-off-by: Werner Koch <[email protected]>
* common: Add new function isodate_human_to_tmWerner Koch2015-04-101-1/+2
| | | | | | | | | | | | | | * common/gettime.c (isotime_human_p): Add arg date_only. (isodate_human_to_tm): New. * common/t-gettime.c (test_isodate_human_to_tm): New. (main): Call new test. -- This function in intended as replacement for strptime (foo, "%Y-%m-%d", &bar) which is not available under Windows.
* Import _gpgme_parse_timestamp from gpgme as parse_timestamp.Neal H. Walfield2015-03-231-0/+1
| | | | | | | | | | | * common/gettime.h (parse_timestamp): New declaration. * common/gettime.c (_win32_timegm): New function imported from gpgme/src/conversion.c:_gpgme_timegm. (parse_timestamp): New function imported from gpgme/src/conversion.c:_gpgme_parse_timestamp. -- Signed-off-by: Neal H. Walfield <[email protected]>
* common: New function elapsed_time_string.Werner Koch2014-03-181-0/+2
| | | | * common/gettime.c (elapsed_time_string): New.
* remove doubled words in a commentJim Meyering2012-04-261-3/+3
|
* Add new functions to convert iso time strings.Werner Koch2011-03-011-0/+3
|
* Add a separate header for time related fucntions.Werner Koch2010-04-201-0/+51