HISE Logo Forum
    • Categories
    • Register
    • Login

    Getting todays date in HISE

    Scheduled Pinned Locked Moved General Questions
    33 Posts 7 Posters 2.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Casey KolbC
      Casey Kolb @ustk
      last edited by

      @ustk I think just being able to grab the current system date and time is super useful. Maybe something like Engine.getSystemDate() returns

      {
        year: 2020,
        month: 11,
        day: 19,
        hour: 14,
        minute: 55,
        second: 32
      }
      

      ๐Ÿค” But I'm sure there's a better way of returning it. This isn't my forte haha.

      Casey Kolb
      Founder & CEO of Lunacy Audio
      Composer | Producer | Software Developer

      ustkU 1 Reply Last reply Reply Quote 1
      • Christoph HartC
        Christoph Hart
        last edited by

        I would suggest to not go down the rabbit hole of trying to outsmart a imaginary cracker. Just make sure your plugin canโ€˜t be copied to multiple machines by a simple user and leave the rest to companies who sell usb dongles for a living...

        1 Reply Last reply Reply Quote 3
        • ustkU
          ustk @Casey Kolb
          last edited by

          @Lunacy-Audio The juce Time class allows everything we need so it is just a matter of what we need and I'll find a way to make the API
          Currently, I've made one that gives the number of days since 1970. I've just made a simple conversion since it is originally in milliseconds...

          Can't help pressing F5 in the forum...

          1 Reply Last reply Reply Quote 2
          • Casey KolbC
            Casey Kolb
            last edited by

            Sounds reasonable ๐Ÿ˜€

            Casey Kolb
            Founder & CEO of Lunacy Audio
            Composer | Producer | Software Developer

            ustkU 1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @Casey Kolb
              last edited by ustk

              @Lunacy-Audio What sounds reasonable? โ˜บ

              Can't help pressing F5 in the forum...

              L 1 Reply Last reply Reply Quote 0
              • Casey KolbC
                Casey Kolb
                last edited by

                The number of days since 1970. Also, the addition of the function I mentioned above would be great too, but no rush.

                Casey Kolb
                Founder & CEO of Lunacy Audio
                Composer | Producer | Software Developer

                ustkU 1 Reply Last reply Reply Quote 0
                • L
                  LeeC @ustk
                  last edited by

                  @ustk The time since 1970 and also any format of system date would be great for now.
                  If it's too tricky to pull back an object with the attributes that @Lunacy-Audio suggested then a simple string would be useful too.

                  Appreciate you looking into this for us ๐ŸŒŸ
                  I'm sure it will come in handy for other HISE things outside of copy protection also.

                  1 Reply Last reply Reply Quote 0
                  • ustkU
                    ustk @Casey Kolb
                    last edited by ustk

                    Ok guys I've added the Engine.getSystemTime(bool includeDividerCharacters) API from Juce
                    it returns a fully described string of the date and time in ISO-8601 format (using the local timezone) with or without divider characters.
                    It is up to you @Christoph-Hart to merge it of course, but if you find it unnecessary, the mod is easy for anyone interested...

                    // Returns a string with separator:
                    2020-11-21T16:07:08.525+01:00
                    
                    // Or without separator
                    20201121T160708.525+0100
                    

                    Can't help pressing F5 in the forum...

                    dejansD L Casey KolbC 3 Replies Last reply Reply Quote 5
                    • dejansD
                      dejans @ustk
                      last edited by

                      @ustk Thank You!

                      1 Reply Last reply Reply Quote 0
                      • L
                        LeeC @ustk
                        last edited by

                        @ustk Legend thanks!

                        1 Reply Last reply Reply Quote 0
                        • Casey KolbC
                          Casey Kolb @ustk
                          last edited by

                          @ustk Woo! Thanks man.

                          Casey Kolb
                          Founder & CEO of Lunacy Audio
                          Composer | Producer | Software Developer

                          1 Reply Last reply Reply Quote 0
                          • L
                            LeeC
                            last edited by

                            @Christoph-Hart is it possible to get this merged?
                            Cheers

                            1 Reply Last reply Reply Quote 2
                            • L
                              LeeC
                              last edited by

                              @d-healey are you still maintaining a branch that we could potentially merge this change made by @ustk to?
                              Desperate to make use of this 'Date Logic' but don't want to pester the man (@Christoph-Hart) anymore than we need to.

                              Cheers

                              1 Reply Last reply Reply Quote 0
                              • Christoph HartC
                                Christoph Hart
                                last edited by

                                Itโ€˜s already merged in the main scriptnode branch.

                                L 1 Reply Last reply Reply Quote 1
                                • L
                                  LeeC @Christoph Hart
                                  last edited by

                                  Oh really?!
                                  Legend thanks @Christoph-Hart and big thanks again to @ustk for making the change!
                                  Downloading the latest scriptnode now...

                                  ustkU 1 Reply Last reply Reply Quote 0
                                  • ustkU
                                    ustk @LeeC
                                    last edited by

                                    @LeeC look for Engine.getSystemTime(bool includeDividerCharacters)

                                    Can't help pressing F5 in the forum...

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

                                    14

                                    Online

                                    1.7k

                                    Users

                                    11.8k

                                    Topics

                                    102.3k

                                    Posts