From: bug-gnucobol-bounces+edward.dan.hart=gmail.com@gnu.org <bug-gnucobol-bounces+edward.dan.hart=gmail.com@gnu.org> on behalf of georg wrede <georg.wrede@gmail.com>
Sent: Monday, 7 November 2022, 17:11
To: bug-gnucobol@gnu.org <bug-gnucobol@gnu.org>
Subject: WHEN-COMPILED date offset wrong
Hi.
I live in Europe/Helsinki, where the timezone offset is +2 hours. The time offset of WHEN-COMPILED shows as "+0020" instead of "+0200".
Example:
user@machine $ ls -l
total 24
-rwxrwxr-x 1 user user 17464 Nov 7 17:45 when
-rw-rw-r-- 1 user user 200 Nov 1 01:47 when.cob
user@machine $ ./when
PROGRAM COMPILED ON: 2022110717453867+0020
user@machine $ date
Mon, 07 Nov 2022 17:47:25 +0200
user@machine $ cat when.cob
* When compiled
IDENTIFICATION DIVISION.
PROGRAM-ID. WHEN.
PROCEDURE DIVISION.
DISPLAY 'PROGRAM COMPILED ON: ' FUNCTION WHEN-COMPILED.
STOP-RUN.
user@machine $ cobc --version
cobc (GnuCOBOL) 2.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
Built Jul 17 2018 20:29:40
Packaged Sep 06 2017 18:48:43 UTC
C version "8.1.0"
user@machine $ uname -a
Linux machine 5.4.0-126-generic #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
user@machine $
The Cobol compiler is straight out of the box, and so is Linux. No settings or tweaks are made.
Yours sincerely,
Georg