This patch fixes multiple issues in VirtualRealTimeClockLib.c: 1. Use of two separate variables (ElapsedSeconds and EpochSeconds) in LibGetTime(), where only a single one should have been used.
2. Possible underflow while sustracting TZ/DST offsets in LibSetTime() if the user sets a date that is very close to start of epoch. 3. Non substraction of elpased seconds since reset, which would lead to the following behaviour in UEFI shell (assuming for this example that exactly 5 minutes have elapsed since platform reset): Shell> time 12:00:00 Shell> time 12:05:01 (LOCAL) In other words, setting and immediately reading back the time would result in the returned value being offset by the time since reset. This last behaviour has been observed (and confirmed fixed) using an RPi3 platform. Regards, /Pete Pete Batard (1): EmbeddedPkg: Fix multiple Virtual RTC issues .../VirtualRealTimeClockLib.c | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) -- 2.17.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel