This is an automated email from the ASF dual-hosted git repository.
damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new d917f5e java.util.Calendar's MONTH is 0-based.
d917f5e is described below
commit d917f5e50e8747870854d4ad71be7f834cc09fd3
Author: Damjan Jovanovic <[email protected]>
AuthorDate: Tue Jul 28 07:20:12 2020 +0200
java.util.Calendar's MONTH is 0-based.
Patch by: me
---
test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java
b/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java
index cece47a..4c7ce94 100644
--- a/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java
+++ b/test/testuno/source/fvt/uno/sd/file/CheckFileProperties.java
@@ -183,7 +183,8 @@ public class CheckFileProperties {
Calendar ca = Calendar.getInstance();
DateTime currentDateTime = new DateTime();
currentDateTime.Year = (short)ca.get(Calendar.YEAR);
- currentDateTime.Month = (short)ca.get(Calendar.MONTH);
+ // java.util.Calendar's months start at 0=January.
+ currentDateTime.Month = (short)(ca.get(Calendar.MONTH) + 1);
currentDateTime.Day = (short)ca.get(Calendar.DATE);
currentDateTime.Minutes = (short)ca.get(Calendar.MINUTE);
currentDateTime.Hours = (short)ca.get(Calendar.HOUR);
@@ -196,7 +197,8 @@ public class CheckFileProperties {
Calendar ca = Calendar.getInstance();
Date currentDate = new Date();
currentDate.Year = (short)ca.get(Calendar.YEAR);
- currentDate.Month = (short)ca.get(Calendar.MONTH);
+ // java.util.Calendar's months start at 0=January.
+ currentDate.Month = (short)(ca.get(Calendar.MONTH) + 1);
currentDate.Day = (short)ca.get(Calendar.DATE);
return currentDate;