mirror of
https://github.com/beeyev/Mikrotik-RouterOS-automatic-backup-and-update.git
synced 2025-07-16 08:54:36 +02:00
Enhance date and time handling in v2.rsc for improved format consistency and validation
This commit is contained in:
parent
96352e4f38
commit
df94a48d04
2 changed files with 75 additions and 24 deletions
|
@ -107,17 +107,6 @@ if ([:len [/system identity get name]] = 0 or [/system identity get name] = "Mik
|
|||
:local zro 0;
|
||||
:local tmp;
|
||||
|
||||
# Replace word `beta` with dot
|
||||
:local isBetaPos [:tonum [:find $osVer "beta" 0]];
|
||||
:if ($isBetaPos > 1) do={
|
||||
:set osVer ([:pick $osVer 0 $isBetaPos] . "." . [:pick $osVer ($isBetaPos + 4) [:len $osVer]]);
|
||||
}
|
||||
# Replace word `rc` with dot
|
||||
:local isRcPos [:tonum [:find $osVer "rc" 0]];
|
||||
:if ($isRcPos > 1) do={
|
||||
:set osVer ([:pick $osVer 0 $isRcPos] . "." . [:pick $osVer ($isRcPos + 2) [:len $osVer]]);
|
||||
}
|
||||
|
||||
:local dotPos1 [:find $osVer "." 0];
|
||||
|
||||
:if ($dotPos1 > 0) do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue