Hi Gary,

The patch looks good. We can help to check-in if you don't have commit right.

Best Regards,
Ye Ting

-----Original Message-----
From: Gary Ching-Pang Lin [mailto:g...@suse.com] 
Sent: Tuesday, July 09, 2013 5:27 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] [PATCH] CryptoPkg SysCall lib: adjust the result of gmtime()

Per gmtime manpage, tm_mon is the number of months since January while MonthNo 
is the month of the year, so tm_mon should be MonthNo-1.

Also, tm_mday is the day of the month, and DayNo is the number of days since 
the first day of the month. Assigning DayNo+1 to tm_mday to fix the definition.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin <g...@suse.com>
---
 CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c 
b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c
index 805e6b4..15be4ef 100644
--- a/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c
+++ b/CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c
@@ -154,8 +154,8 @@ struct tm * gmtime (const time_t *timer)
     }
   }
 
-  GmTime->tm_mon  = (int) MonthNo;
-  GmTime->tm_mday = (int) DayNo;
+  GmTime->tm_mon  = (int) MonthNo - 1;
+  GmTime->tm_mday = (int) DayNo + 1;
 
   GmTime->tm_isdst  = 0;
   GmTime->tm_gmtoff = 0;
--
1.8.1.4


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to