From 0a61914124791306c036c6cd560968fb88de119c Mon Sep 17 00:00:00 2001 From: Lars Hvam Date: Wed, 5 Apr 2023 17:04:43 +0200 Subject: [PATCH] get system timezone (#6193) Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com> --- abaplint.json | 6 +++++ package.json | 8 +++---- .../lib/zcl_abapgit_gui_chunk_lib.clas.abap | 22 +++++++++++++------ test/abap_transpile.json | 4 ---- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/abaplint.json b/abaplint.json index 47bb468c2..ee3247615 100644 --- a/abaplint.json +++ b/abaplint.json @@ -49,6 +49,12 @@ "globalMacros": [] }, "rules": { + "strict_sql": false, + "cds_comment_style": true, + "change_if_to_case": false, + "expand_macros": true, + "unnecessary_return": false, + "fully_type_itabs": false, "cds_legacy_view": true, "superfluous_value": true, "classic_exceptions_overlap": true, diff --git a/package.json b/package.json index 9c3420090..ff80d4cbd 100644 --- a/package.json +++ b/package.json @@ -26,12 +26,12 @@ ] }, "devDependencies": { - "@abaplint/cli": "^2.95.50", + "@abaplint/cli": "^2.97.4", "@abaplint/database-sqlite": "^2.5.39", - "@abaplint/runtime": "^2.5.60", - "@abaplint/transpiler-cli": "^2.5.60", + "@abaplint/runtime": "^2.5.76", + "@abaplint/transpiler-cli": "^2.5.76", "abapmerge": "^0.15.0", "c8": "^7.13.0", - "eslint": "^8.36.0" + "eslint": "^8.37.0" } } diff --git a/src/ui/lib/zcl_abapgit_gui_chunk_lib.clas.abap b/src/ui/lib/zcl_abapgit_gui_chunk_lib.clas.abap index 6993dfa4c..a5871ad34 100644 --- a/src/ui/lib/zcl_abapgit_gui_chunk_lib.clas.abap +++ b/src/ui/lib/zcl_abapgit_gui_chunk_lib.clas.abap @@ -293,13 +293,21 @@ CLASS zcl_abapgit_gui_chunk_lib IMPLEMENTATION. METHOD class_constructor. - CALL FUNCTION 'GET_SYSTEM_TIMEZONE' - IMPORTING - timezone = gv_time_zone - EXCEPTIONS - customizing_missing = 1 - OTHERS = 2. - ASSERT sy-subrc = 0. + DATA lv_fm TYPE string. + lv_fm = 'GET_SYSTEM_TIMEZONE'. + + TRY. + CALL METHOD ('CL_ABAP_TSTMP')=>get_system_timezone + RECEIVING + system_timezone = gv_time_zone. + CATCH cx_sy_dyn_call_illegal_method. + CALL FUNCTION lv_fm + IMPORTING + timezone = gv_time_zone + EXCEPTIONS + customizing_missing = 1 + OTHERS = 2. + ENDTRY. ENDMETHOD. diff --git a/test/abap_transpile.json b/test/abap_transpile.json index 9c71df8da..dda014ae6 100644 --- a/test/abap_transpile.json +++ b/test/abap_transpile.json @@ -97,8 +97,6 @@ {"object": "ZCL_ABAPGIT_PERSIST_PACKAGES", "class": "ltcl_packages", "method": "test_package", "note": "ZABAPGIT table not existing, error cx_sy_dynamic_osql_semantics"}, - {"object": "ZCL_ABAPGIT_AJSON", "class": "ltcl_json_to_abap", "method": "to_abap_array_of_arrays", "note": "Expected table to contain 2 rows, got 4"}, - {"object": "ZCL_ABAPGIT_REQUIREMENT_HELPER", "class": "ltcl_lower_release", "method": "empty_patch", "note": "Void type: CVERS_SDU"}, {"object": "ZCL_ABAPGIT_REQUIREMENT_HELPER", "class": "ltcl_lower_release", "method": "lower_patch", "note": "Void type: CVERS_SDU"}, {"object": "ZCL_ABAPGIT_REQUIREMENT_HELPER", "class": "ltcl_lower_release", "method": "same_patch", "note": "Void type: CVERS_SDU"}, @@ -154,8 +152,6 @@ {"object": "ZCL_ABAPGIT_FILE_DESERIALIZE", "class": "ltcl_prio_deserialization", "method": "xslt_before_clas", "note": "hmm, something with promises?"}, {"object": "ZCL_ABAPGIT_FILE_DESERIALIZE", "class": "ltcl_prio_deserialization", "method": "xslt_before_prog", "note": "hmm, something with promises?"}, - {"object": "ZCL_ABAPGIT_OBJECT_INTF", "class": "ltcl_aff_metadata", "method": "serialize_default", "note": "??"}, - {"object": "ZCL_ABAPGIT_DOT_ABAPGIT", "class": "ltcl_dot_abapgit", "method": "identity", "note": " https://github.com/open-abap/open-abap/issues/471 "}, {"object": "ZCL_ABAPGIT_VERSION", "class": "ltcl_version_parse", "method": "abapgit_version", "note": "Error: ReadReport, transpiler todo"},