Harmony
  1. Harmony
  2. HARMONY-2053

[classlib][port][luni] move port_user_timezone() from DRLVM to classlib

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib, DRLVM
    • Labels:
      None
    • Estimated Complexity:
      Moderate

      Description

      Classlib's j.u.TimeZone expects "user.timezone" property value initialized during VM startup (BTW I did not find explicit statement in VMI docs for that, only indirect reference in kernel stub for j.l.System). I believe this action should be done by hyluni natives during JNI_OnLoad, no reason to burden VM with it. Therefore I suggest to move "port_user_timezone()" function [1] from DRLVM to classlib (luni/port), and fix DRLVM & hyluni accordingly.

      [1] working_vm\vm\port\src\misc[win|linux]\timezone.c

        Issue Links

          Activity

          Hide
          Alexey Varlamov added a comment -

          Hi Deven,
          Basically there is no APR specifics, it is just used for manipulating strings and for reading files & directories. Only general knowledge of Linux C programming is required, you can look into APR documentation and sources to find Linux native replacements for APR functions.
          The business logic is documented inside port_user_timezone() code quite in detail. If you have more specific questions, feel free to ask.

          Show
          Alexey Varlamov added a comment - Hi Deven, Basically there is no APR specifics, it is just used for manipulating strings and for reading files & directories. Only general knowledge of Linux C programming is required, you can look into APR documentation and sources to find Linux native replacements for APR functions. The business logic is documented inside port_user_timezone() code quite in detail. If you have more specific questions, feel free to ask.
          Hide
          deven you added a comment -

          Hi Alexey Varlamov,
          I have read the working_vm\vm\port\src\misc\linux\timezone.c, and noticed the implematation on linux of getting os time zone depends on apr lib, however classlib uses portlib. I believe the migration from apr to porlib is the main problem. can someone known apr help explain the logic of the implematation, so I think I may try to move it into classlib on linux.

          Show
          deven you added a comment - Hi Alexey Varlamov, I have read the working_vm\vm\port\src\misc\linux\timezone.c, and noticed the implematation on linux of getting os time zone depends on apr lib, however classlib uses portlib. I believe the migration from apr to porlib is the main problem. can someone known apr help explain the logic of the implematation, so I think I may try to move it into classlib on linux.

            People

            • Assignee:
              Unassigned
              Reporter:
              Alexey Varlamov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development