https://gcc.gnu.org/g:bcbf6bfa83dbd0c3d3885062db2f7162dd22e9dd

commit r17-4438-gbcbf6bfa83dbd0c3d3885062db2f7162dd22e9dd
Author: Xavier Del Campo Romero <[email protected]>
Date:   Thu Sep 17 23:27:09 2026 +0200

    cobol: Fix cblte-fe-month for CBL_CHECK_FILE_EXIST
    
    The tm_mon member in struct tm contains values from 0 to 11, rather than
    1 to 12. [1]
    
    [1]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html
    
    libgcobol/ChangeLog:
    
            * compat/gnu/lib/CBL_CHECK_FILE_EXIST.cbl: Add 1 to
            cblte-fe-month.

Diff:
---
 libgcobol/compat/gnu/lib/CBL_CHECK_FILE_EXIST.cbl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libgcobol/compat/gnu/lib/CBL_CHECK_FILE_EXIST.cbl 
b/libgcobol/compat/gnu/lib/CBL_CHECK_FILE_EXIST.cbl
index 1b601be37aa4..f2b0be9d1e42 100644
--- a/libgcobol/compat/gnu/lib/CBL_CHECK_FILE_EXIST.cbl
+++ b/libgcobol/compat/gnu/lib/CBL_CHECK_FILE_EXIST.cbl
@@ -76,6 +76,7 @@
            ADD 1900 TO tm_year.
            MOVE tm_year TO cblte-fe-year.
            MOVE tm_mon TO cblte-fe-month.
+           ADD 1 TO cblte-fe-month.
            MOVE tm_mday TO cblte-fe-day.
 
            MOVE tm_hour TO cblte-fe-hours.

Reply via email to