• umbraroze@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    23 days ago

    Well, systemd developers made one of the classic blunders a software developer can do: make a program that has to deal with time and dates. Every time I have to deal with timestamps I’m like “oh shit, here we go again”.

    Anyway, as I understood it the reason this is in systemd is because they wanted to replace cron, and it’s fine by me because cron has it’s own brain-hurt. (The cron syntax is something that always makes me squint real hard for a while.)

    • Phoenixz@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      23 days ago

      I’m sorry but Cron is really easy, of all systems.

      Try using systemd with an ssh server that you want to have running on a non standard port. On non systemd it’s a 15 second ordeal while on systemd I don’t even know where to start, I pushed it out of my memories. It’s something something create files here, restart demons there, removing other files, it is WAY WAY over complicated

      • offspec@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        23 days ago

        What do you mean? You literally just change the /etc/sshd config to point at a different port do you not?

        • Phoenixz@lemmy.ca
          link
          fedilink
          arrow-up
          0
          ·
          17 days ago

          Oh yeah, without systemd that’s all there is to it. With systemd, however, port management is taken out of the ssh config and is done how it was decades ago

  • FreshLight@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    25 days ago

    Oh fuck. I’ll use this from now on. Except for if I won’t use it next week. Then I’ll forget about it because my memory is a damn sieve.

    • Catoblepas@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      0
      ·
      25 days ago

      Just take the next step and make a text file you dump all these commands into and then forget about in a week. When you randomly stumble across it years from now you’ll be able to say “wow, I could have used this 10 months ago if I remembered it existed!”

    • exu@feditown.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      24 days ago

      You need a calendar and time handling anyways for logging purposes and to set timers correctly. It’s likely not that much extra work exposing that functionality.

      • Kusimulkku@lemm.ee
        link
        fedilink
        arrow-up
        0
        ·
        24 days ago

        No, UNIX philosophy demands that every single one of those things is one or more separate things and that half of them are poorly or not at all maintained. Just like God intended.

  • mogoh@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    25 days ago

    Usually such things have a simple explanation. systemd does a lot with time and date, for example scheduling tasks. It’s quite obvious that it has this capabilities, when you think about it.

  • lazynooblet@lazysoci.al
    link
    fedilink
    English
    arrow-up
    0
    ·
    24 days ago

    In the UK, if Christmas or New Year falls on a weekend, a seperate equivalent holiday is made during the week to compensate.

    • my_hat_stinks@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      24 days ago

      This is true for all public holidays in the UK, there’s a (usually) fixed number of public holidays but the dates are flexible.

      They’re also included in the minimum 28 days paid time off too, meaning if you’re a full time worker and have to work on a bank holiday your employer is legally required to offer an extra day off somewhere else instead, either a fixed date or added to your holiday allowance. Conversely, the “extra” day off you get when a monarch keels over may be subtracted from your holiday allowance for the year. This is also why my employer is allowed to follow English bank holidays despite having next to no presence in England; the number is fixed but the dates are not.

    • blackn1ght@feddit.uk
      link
      fedilink
      arrow-up
      0
      ·
      24 days ago

      Wait, do other countries not do this? So if a public holiday falls on a Saturday it doesn’t get pushed to Monday?

      • superkret@feddit.org
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        24 days ago

        Germany doesn’t do this, but the minimum, when all holidays fall on the worst possible days, is more than the number of holidays in the UK.

  • kameecoding@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    24 days ago

    It is literally happening this year.

    24th is Tuesday. 1st of January is Wednesday and as a bonus Jan 6 is also a holiday in my country and that’s Monday.

    So from dec 22 to jan 6 i can be home by using just 6 days off

    • flamingos-cant@feddit.ukOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      15 days ago

      As others have said on this thread, it’s because systemd has fairly advanced timer system that basically requires implementing a calendar.

      To do it, the command is in the screenshot systemd-analyze calendar "Tue *-12-25".