mirror of
https://git.proxmox.com/git/libgit2
synced 2025-10-19 03:00:09 +00:00
Fix time_t
conversion on Win32
This commit is contained in:
parent
14eb94eefa
commit
53b7560ba5
@ -68,7 +68,7 @@ git_signature *git_signature_dup(const git_signature *sig)
|
|||||||
git_signature *git_signature_now(const char *name, const char *email)
|
git_signature *git_signature_now(const char *name, const char *email)
|
||||||
{
|
{
|
||||||
time_t now;
|
time_t now;
|
||||||
int offset;
|
time_t offset;
|
||||||
struct tm *utc_tm, *local_tm;
|
struct tm *utc_tm, *local_tm;
|
||||||
|
|
||||||
#ifndef GIT_WIN32
|
#ifndef GIT_WIN32
|
||||||
@ -96,7 +96,7 @@ git_signature *git_signature_now(const char *name, const char *email)
|
|||||||
if (local_tm->tm_isdst)
|
if (local_tm->tm_isdst)
|
||||||
offset += 60;
|
offset += 60;
|
||||||
|
|
||||||
return git_signature_new(name, email, now, offset);
|
return git_signature_new(name, email, now, (int)offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int parse_timezone_offset(const char *buffer, long *offset_out)
|
static int parse_timezone_offset(const char *buffer, long *offset_out)
|
||||||
|
Loading…
Reference in New Issue
Block a user