From 4cc9c2d3e1c4c51e6cb4e50620be12e9bc242773 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 4 Aug 2019 23:40:53 +0300 Subject: [PATCH] GUACAMOLE-861: Fixes WINDOWS_TIME calculation This fixes the UNIX time to FILETIME conversion in WINDOWS_TIME macro, according to MSDN (addition instead of subtraction). --- src/protocols/rdp/rdp_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocols/rdp/rdp_fs.h b/src/protocols/rdp/rdp_fs.h index e8299efc..f1e42956 100644 --- a/src/protocols/rdp/rdp_fs.h +++ b/src/protocols/rdp/rdp_fs.h @@ -188,7 +188,7 @@ * Converts a UNIX timestamp (seconds since Jan 1, 1970 UTC) to Windows * timestamp (100 nanosecond intervals since Jan 1, 1601 UTC). */ -#define WINDOWS_TIME(t) ((t - ((uint64_t) 11644473600)) * 10000000) +#define WINDOWS_TIME(t) ((t + ((uint64_t) 11644473600)) * 10000000) /** * An arbitrary file on the virtual filesystem of the Guacamole drive.