Timespan Variables (mac_auth_check_timespan)
Overview
This reference outlines exactly how constants and extracted integers behave to manage Time bounds natively in Unlang.
Extracted Variables Tree
[Database Query] -> Control-UnixDayTime (Derived local timestamp) [Database Query] -> Control-Weekday (Derived 1-7 day offset) [User Session Record] -> Control-Timespan (Regex Pattern array) ├── Tmp-String-6 (First node integer logic) -> Tmp-Integer-1 ├── Tmp-String-7 (Second node integer logic) -> Tmp-Integer-2 ├── Tmp-String-8 (Third node integer logic) -> Tmp-Integer-3 └── Tmp-String-9 (Fourth node integer logic) -> Tmp-Integer-4
Variable Breakdown
-
Control-UnixDayTime: QueriesTIME_TO_SEC(CURTIME()). Sets the absolute seconds from midnight to allow simple mathematical bound-checking instead of convoluted datetime libraries. -
Control-Weekday: ConvertsDAYOFWEEK(NOW())(1=Sun) to a localized logic layout (1=Mon, 7=Sun). -
Control-Timespan: The raw array pulled directly fromLOCTOPACKAGE. Matches structures like1-5:3600-7200. -
Tmp-String-6toTmp-String-9: String pointers built by Regex%{1}…%{4}encapsulating day ranges and second boundaries. -
Tmp-Integer-1toTmp-Integer-4: Type-safe conversions derived strictly from their string counterparts usingexpr: String + 0. -
Control-RestrictionOk: Boolean wrapper set sequentially tono, and toggled mathematically toyesif a condition binds properly. -
Control-RestrictionTimeout: The direct mathematical subtraction (Tmp-Integer-4-Control-UnixDayTime). Establishes how many seconds the user literally has left before hitting the wall.