Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Gelöst: Zeitstempel MEZ

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Gelöst: Zeitstempel MEZ

    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      michihorn last edited by michihorn

      Hallo,
      wie erlange ich folgendes Datumsstatement?
      Wed May 01 2024 12:02:36 GMT+0200 (Mitteleuropäische Sommerzeit)

       const date = new Date();
      console.log(new Date(date).toString());
      

      bringt mir: Wed May 01 2024 13:54:00 GMT+0200 (Central European Summer Time)
      wie kann ich (central European Summer Time) durch (Mitteleuropäische Sommerzeit) ersetzen?

      var test=new Date(date).toString();
      log(test.replace("(Central European Summer Time)", '(Mitteleuropäische Sommerzeit)'));
      

      Klar mit geht das auch per Script, aber geht das auch einfacher? Könnte ja auch mal Winterzeit sein.

      Gruß
      Michael

      paul53 OliverIO Homoran 4 Replies Last reply Reply Quote 0
      • paul53
        paul53 @michihorn last edited by paul53

        @michihorn

        console.log(new Date().toString());
        

        Ich erhalte im Log

        Wed May 01 2024 16:14:18 GMT+0200 (Mitteleuropäische Sommerzeit)
        

        Muss wohl eine Einstellung im ioBroker sein?

        1 Reply Last reply Reply Quote 1
        • OliverIO
          OliverIO @michihorn last edited by OliverIO

          @michihorn

          ich vermute das die sprache des betriebssystems auf englisch eingestellt ist.
          probiere mal hier
          https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString?retiredLocale=de

          wenn du auf der shell den befehl
          locale
          eingibst siehst du was eingestellt ist.
          bei ist ist
          LANG=de_DE.UTF-8
          eingestellt und das von dir gewünschte ergebnis wird ausgegeben

          1 Reply Last reply Reply Quote 1
          • Homoran
            Homoran Global Moderator Administrators @michihorn last edited by

            @michihorn bitte Threadtitel sinnvoll anpassen

            1 Reply Last reply Reply Quote 0
            • paul53
              paul53 @michihorn last edited by

              @michihorn sagte: Gelöst:

              Welche Einstellung musste geändert werden: ioBroker oder OS?

              M 1 Reply Last reply Reply Quote 0
              • M
                michihorn @paul53 last edited by

                @paul53 OS

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                Support us

                ioBroker
                Community Adapters
                Donate
                FAQ Cloud / IOT
                HowTo: Node.js-Update
                HowTo: Backup/Restore
                Downloads
                BLOG

                776
                Online

                31.9k
                Users

                80.3k
                Topics

                1.3m
                Posts

                javasript
                4
                6
                163
                Loading More Posts
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes
                Reply
                • Reply as topic
                Log in to reply
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                The ioBroker Community 2014-2023
                logo