Time is wrong (F5 or Edit->Ins->Date/Time)

Time is wrong (F5 or Edit->Ins->Date/Time)

7

    May 02, 2019#1

    When UE inserts the time, it is incorrect. I checked with command line (timedatectl) and it is all correct. How do I fix this?

    Can anyone help?

    EigenFunctions
    Ubuntu 18.04 LTS 64 bit
    EigenFunctions
    UE on Ubuntu 18 LTS
    Intel [email protected] GHz; 8 GB RAM; 1 TB HDD

    6,628551
    Grand MasterGrand Master
    6,628551

      May 03, 2019#2

      What do you mean with incorrect? Is the hour wrong, is minute wrong, is date wrong or is date/time just inserted with a date/time format not as expected by you. Which format do you have configured in Ubuntu date/time settings which usually depends on configured country?

      A global template can be defined by you using Modify Templates dialog to insert date/time in customized format on inserting this global template from Template List or by key on having assigned a hotkey or chord to global template.
      Best regards from an UC/UE/UES for Windows user from Austria

      7

        May 03, 2019#3

        Mofi:

        date:

        Code: Select all

        Fri May  3 08:03:46 EDT 2
        timedatectl:

        Code: Select all

                              Local time: Fri 2019-05-03 08:04:47 EDT
                          Universal time: Fri 2019-05-03 12:04:47 UTC
                                RTC time: Fri 2019-05-03 12:04:47
                               Time zone: America/New_York (EDT, -0400)
               System clock synchronized: yes
        systemd-timesyncd.service active: yes
                         RTC in local TZ: no
        
        UE:  

        Code: Select all

        05/03/2019 12:05:53 PM

        Code: Select all

        uex - UltraEdit Version 18.00.0.40
        "Code" sections are results from a command (easier to see with fixed font).

        I do not have any templates set. I have not fully transferred preferences from Windows. It looks like the time zone isn't being used by UE, but I have no idea how to fix the UE deficiency.

        Can you help?
        EigenFunctions
        UE on Ubuntu 18 LTS
        Intel [email protected] GHz; 8 GB RAM; 1 TB HDD

        6,628551
        Grand MasterGrand Master
        6,628551

          May 03, 2019#4

          Thank your for the additional information. It is more clear now what is the issue.

          Well, the solution is the definition and usage of a template which defines date and time to insert in the format you want and not in format as defined somewhere outside of UltraEdit.

          The command Date/Time inserts the date and time as returned by a standard library. I use only Windows and know where in Windows settings to define date and time formats. But I don't use in UltraEdit for Windows the command Date/Time. I have defined many years ago on Windows 98 two global templates to insert just date in format DD.MM.YYYY (German date format) or in format YYYY-MM-DD (international date format) independent on what is currently configured in Windows settings. So I recommend to do the same and define a global template to insert the current date/time in the format you want independent on which date/time string the library function used by UltraEdit for Linux returns depending on settings set somewhere on Ubuntu.

          The first page found by my favorite www search engine on searching for "Ubuntu 18.04" date time format was Customize Time & Date Format in Ubuntu 18.04.

          As far as I know it is possible on Linux/Mac to set for every application individual date/time formats by setting appropriate environment variables before starting the application. So it would be good to run from within UEX the command printenv and take a look on the output environment variables and their values.

          I cannot really help with a step by step description for definition and usage of a template on UEX or how to configure date/time on Ubuntu 18.04 as I don't have any computer running on Linux and so don't have UEX.
          Best regards from an UC/UE/UES for Windows user from Austria

          7

            May 04, 2019#5

            Mofi,

            I don't care about the format. It's that fact that UEX reports the wrong time that is important.

            You mentioned to run from within UEX the command printenv, but I don't know how to do that within UEX. I did that on the Linux command line and it shows all the environment variables, none of which seem to have anything to do with time zones or offsets, etc.

            Can you help?
            EigenFunctions
            UE on Ubuntu 18 LTS
            Intel [email protected] GHz; 8 GB RAM; 1 TB HDD

            6,628551
            Grand MasterGrand Master
            6,628551

              May 04, 2019#6

              Hm, the time is not wrong, it is the UTC time, not the local time which of course is not what a user usually wants on inserting current date/time.

              UltraEdit for Windows has in menu Advanced the menu item DOS command to run from within UltraEdit Windows command processor cmd.exe with the specified command (line) and capture the output into a new file. In other words on Windows the user can click on Advanced - DOS command, enter command set, click on button OK and get displayed in a new edit window all environment variables set for UltraEdit process. I suppose there is something similar in UEX to execute a shell command from within UEX. Otherwise configure quickly a user tool which executes printenv with capturing output to a new file.

              There is Ubuntu Environment Variables listing the predefined environment variables on Ubuntu like LC_TIME. I found also this page Time Zones: TZ vs tzselect vs timedatectl on which the questioner did not get any answer unfortunately. More helpful could be the page: How to set or change timezone on Ubuntu 18.04?

              I have just read on UltraEdit for Windows help page Settings:File handling:Encoding that the configured locale determines also date/time format on using command Date/time. But this is not true on Windows 7 with currently latest UltraEdit for Windows according to my tests. I get the date and time inserted always in format as defined in Windows 7 date/time format settings independent on which locale is configured in settings of UltraEdit. I don't know if UEX has a locale setting in Preferences at all.

              Please note that this is a user-to-user forum and I am a user without Ubuntu nor any other Linux. There are not many UEX users visiting frequently the forums which is the reason why I replied at all although not using Ubuntu 18.04 and UEX. You may ask IDM support by email for help on this issue. See technical support page which could be more promising on this issue.
              Best regards from an UC/UE/UES for Windows user from Austria